Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RTC Java API What workflow actions are safe to apply to a particular state?

Hi
I have some code which programmatically changes work item states. I had hoped that this:

IWorkflowInfo workflowInfo = workItemClient.findWorkflowInfo(workItem, null);
Identifier<IWorkflowAction> actionIds[] = workflowInfo.getAllActionIds();

Would get all the allowed actions for a  workitem in a given state. In fact it seems to return a fairly generic set, in my case:
Resolve:Set Resolved:Verify:Reopen:Initialize:Start Working:Close:Untriage:Triage:Stop Working

I have a test which starts with a WorkItem in state 'New', I apply the action corresponding to 'Start Working' and the workitem state correctly changes to 'In Progress'. However, if I apply the same action again, the workitem state reverts to 'New'. I expected this to either fail (throw an exception) or do nothing.

Is there a way that I can reliably determine what workflow actions can correctly be applied to a work item in a given state? I guess there must be.....

Zoe

0 votes



One answer

Permanent link
Answered my own question. I had failed to find:
Identifier<IWorkflowAction> actionIds[] = workflowInfo.getActionIds(workItem.getState2());

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,937

Question asked: Jan 28 '14, 1:19 p.m.

Question was seen: 4,027 times

Last updated: Jan 28 '14, 3:05 p.m.

Confirmation Cancel Confirm