Why does a failed work item save in a participant cause the entire save operation to fail?
- Surrounding the entire contents of the run() method in a try/catch(Throwable t) - no effect
- Removed my participant from the process configuration - the save works fine
Accepted answer
com.ibm.team.process.service.IServerProcess#advise() returns a report that will tell you whether or not the user has permission to save. You must pass in the advisable operation. In your case, this would be the save on the work item you created.
Martha (Ruby) Andrews
Jazz L3 Developer
Comments
2 other answers
It is probably very hard to check if the user has permission and the whole mechanism allows to create and edit. The permissions are checked when doing the save.
I also think it would be bad design if you could circumvent such basic permissions.
Comments
the help for that datatype says (I have never built one to pass to advise)
An operation advisable by process. Advisable operations can be configured by end users with pre-condition checks (@see
IOperationAdvisor
) and post-operation participation (@see
IOperationParticipant
).
Advisable operations must be declared via extension so that clients can view the list of available operations to configure when authoring their process. Advisable operations are declared on the client as elements of the extension point
com.ibm.team.process.client.configurationPoints
. Operations are declared on the server as elements of the extension point
com.ibm.team.process.service.configurationPoints
.
For example:
<extension
point="com.ibm.team.process.client.configurationPoints">
<operation
id="com.ibm.example.operation"
name="Example Operation">
<action id="foo">
<action id="bar"/>
</action>
<action id="foo2">
<action id="bar2"/>
</action>
</operation>
</extension>
Advisable operations may not be executed by clients directly. They should instead be passed to the advise and execute methods on the client or server process (@see com.ibm.team.process.client.IClientProcess and com.ibm.team.process.service.IServerProcess).
- Since:
- 0.5