It's all about the answers!

Ask a question

Programatically change workitem state


Dan Sevcenco (5021923) | asked May 06 '13, 9:17 a.m.
I know that this question has been asked several times before and I did my due diligence to read through all of them. I am asking this very same question again because, although I have followed the solutions recommended in those topics, I cannot trigger a programmatic change of state for my workitems.

I have a participant that is responsible to trigger a workflow change when certain conditions are met: all approvals are closed, the current state is a particular one in the workflow.

What I am doing is to invoke the following piece of code :

IStatus saveStatus = fWorkItemServer.saveWorkItem2 (workItemWorkingCopy, null, workflowAction);

where the workflowAction is a string representation of the ID of the target state. This ID is retrieved from an IWorkflowInfo object.

By the way, the target state is a direct successor of the current state of the workitem.

Well, this code does exactly nothing. So, what am I missing here? Have I forgot to make some preparations?

NB : I have also followed the UpdateParentParticipants example on the rsjazz.net site.


Be the first one to answer this question!


Register or to post your answer.