Bug 536647 (RHQ-976) - OperationResult should contain an explicit notion of 'isSuccess'/'isFailure'
Summary: OperationResult should contain an explicit notion of 'isSuccess'/'isFailure'
Keywords:
Status: CLOSED NEXTRELEASE
Alias: RHQ-976
Product: RHQ Project
Classification: Other
Component: Operations
Version: 1.1
Hardware: All
OS: All
high
medium
Target Milestone: ---
: ---
Assignee: Joseph Marques
QA Contact: Corey Welton
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-13 08:00 UTC by Heiko W. Rupp
Modified: 2009-02-18 17:24 UTC (History)
0 users

Fixed In Version: 1.2
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Heiko W. Rupp 2008-10-13 08:00:00 UTC
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 15:23:09 UTC
See also https://jira.jboss.org/jira/browse/JOPR-47

Comment 2 John Mazzitelli 2009-01-14 15:32:04 UTC
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 18:45:40 UTC
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 20:07:01 UTC
embjopr r113 updates Embedded's OperationServerService impl to conform to the new API.


Comment 5 Corey Welton 2009-02-18 17:24:23 UTC
QA Verified

Comment 6 Red Hat Bugzilla 2009-11-10 21:20:49 UTC
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.