Bug 536647 - (RHQ-976) OperationResult should contain an explicit notion of 'isSuccess'/'isFailure'
OperationResult should contain an explicit notion of 'isSuccess'/'isFailure'
Product: RHQ Project
Classification: Other
Component: Operations (Show other bugs)
All All
high Severity medium (vote)
: ---
: ---
Assigned To: Joseph Marques
Corey Welton
: Improvement
Depends On:
  Show dependency treegraph
Reported: 2008-10-13 04:00 EDT by Heiko W. Rupp
Modified: 2009-02-18 12:24 EST (History)
0 users

See Also:
Fixed In Version: 1.2
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Heiko W. Rupp 2008-10-13 04:00:00 EDT
We have seen a lot of strange effects / displays around returned operation values.
The OperationResult should get an explicit field denoting if the operation resulted in an error or not.
Currently this is done by  throwing an Exception in the plugin.
The 'get*Result()' in OperationResult does not help, as it is free text
Comment 1 Heiko W. Rupp 2009-01-14 10:23:09 EST
See also https://jira.jboss.org/jira/browse/JOPR-47
Comment 2 John Mazzitelli 2009-01-14 10:32:04 EST
OperationsResults should add a new "isSuccessful()" method that returns true or false. "setSuccessful(boolean)" will allow the plugin developer to tell the server if this operation failed or succeeded.

The PC now needs to examine isSuccessful() to determine if it needs to call operationSuccess or operationFailure on the server service (the PC's exception handling can remain the same).

The server service impl needs to add a new Configuration results parameter to its operationFailure() method. *This can be null* - if its null, it should be ignored by the server-service impl on the server (this will be null when the failure was detected via an exception being thrown by the plugin or PC).
Comment 3 Joseph Marques 2009-01-14 13:45:40 EST
rev2631 - provide mechanism to allow plugin developers to provide a specific failure message, as opposed to being forced to throw an exception out of the invokeOperation method; 
this allows them to fill in additional details into the complexResults object, such as capture stdout/stderr at the time of failure or even error/return codes; 
Comment 4 Ian Springer 2009-01-20 15:07:01 EST
embjopr r113 updates Embedded's OperationServerService impl to conform to the new API.
Comment 5 Corey Welton 2009-02-18 12:24:23 EST
QA Verified
Comment 6 Red Hat Bugzilla 2009-11-10 16:20:49 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-976

Note You need to log in before you can comment on or make changes to this bug.