Approvals and workitem state change
One answer
You can use Approval Trackings to automatically trigger changes based on approvals. https://jazz.net/library/article/129/ has a little more information about this.
Comments
Hello Lauren,
How does one do this workflow state change via plugin code on server side? The solution you suggested does not work for me because it interferes with and advisor that acts as guard against state change unless certain conditions are met.
So, as far as I know about RTC (and I will admit to having limited knowledge as I have started on the RTC extending path only a couple of weeks ago) I need to manage this in a participant that invokes :
fWorkItemServer.saveWorkItem2 (workItemWorkingCopy, null, workflowAction);
where workflowAction is the ID of a workflow target state.
Unfortunaltely, this does not produce any results in my case. By the way, I am working with RTC v4.0.0
Thanks,
Dan
Hi Dan,
There are "Approval Trackings" that will automatically change the state of a work item based on an approval changing. https://jazz.net/library/article/129/ has a good screenshot of Approval Trackings. https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.team.workitem.doc/topics/t_defining_approval_process.html&scope=null explains how to set them up. An example is "In the Defect Workflow in the Scrum process, when a user sets the Verification approval to Approved, the Verify workflow action is performed. That action changes the state of the work item from Resolved to Verified."
Lauren,
Thanks for the info but that is exactly what I cannot do because RTC managed automatic workflow state transitions interfere with my advisor and participant.
So I have to trigger the state change myself and it does not work with the saveWorkItem2 method. There is something that I am missing but what?
Can you please post a very simple example of server side code that does that and you know works? I want to see if my code is missing some required code.
Thank you.
Dan
Hi Dan,
I misunderstood your first comment. http://rsjazz.wordpress.com/2012/11/27/resolve-parent-if-all-children-are-resolved-participant/ has example code that updates the state of a work item.
Hello Lauren,
That is exactly the example I have been looking at for the past 2 days in order to understand the differences between that code and mine. Except for the fact that I am invoking the saveWorkItem2 versus saveWorkItem3 in that example, there is no difference in the way the save is set up.
So, why is saveWorkItem2 not working????
Hi Dan,
I'm not very familiar with this part of the api myself, so I'm not sure what the difference is. @rschoon can you shed some light on this?