Server-Side Java API - How Can I Determine at Runtime if a Work Item Can Be Saved Without Trying to Save
I have several follow-up actions that save a work item subsequent to the operator saving that work item. In certain cases, the follow-up action may not be able to save the work item. It's failure would prevent the user from saving the work item as well. In many of these instances, I would prefer for my follow-up action to just exit gracefully and allow the operator's save to complete unfettered.
Is there a way in the server-side Java API to check whether a saveWorkItem3 operation would be successful without actually trying to perform the save? I thought that maybe I could just catch the exception that is thrown if the saveWorkItem3 operation fails, but I think I tried that and it still halted the user's manual save action.
I thought I had read that this was possible in a forum posting at some point, but I've been unable to find it.
Edit: I had forgotten that I had an unresolved question on this subject already so I ended up asking the question again here: https://jazz.net/forum/questions/212374/how-can-i-allow-a-follow-up-action-to-fail-but-still-save-the-work-item
One answer
you CAN do this for Advice (advisors) on with the AdvisableOperation class (1st parm to the participant)
using the
public abstract IOperationReport run(IBehaviorConfiguration configuration, IProgressMonitor monitor) throws TeamRepositoryException;
but I don't see anything on Participants pre-check.
Comments
sam detweiler
Dec 04 '15, 11:47 p.m.Nate Decker
Dec 14 '15, 9:58 a.m.