Setting state of work item in post-condition
4 answers
Baris,
Are you talking about a pre-condition or a follow up action?
I'm not aware of any "post condition" or did I miss something?
# Pre-Condition
===========
I assume that you already went thru the following page: https://jazz.net/wiki/bin/view/Main/RTCSDK20_ProcessPreConditionExample.
You can find a good example of a "pre condition" in you check, for example, the class com.ibm.team.workitem.service.internal.save.AllChildrenClosedPrecondition stored in the plugin com.ibm.team.workitem.service.
The class has to be an implementation of IOperationAdvisor, the plugin must extend the extension point "com.ibm.team.process.service.operationAdvisors" and the "com.ibm.team.repository.common.components".
# Follow-up
========
For the follow up action, you can check out our workshop http://jazz.net/library/article/477. It adds a follow up action on the save work item event.
I hope it will help
Are you talking about a pre-condition or a follow up action?
I'm not aware of any "post condition" or did I miss something?
# Pre-Condition
===========
I assume that you already went thru the following page: https://jazz.net/wiki/bin/view/Main/RTCSDK20_ProcessPreConditionExample.
You can find a good example of a "pre condition" in you check, for example, the class com.ibm.team.workitem.service.internal.save.AllChildrenClosedPrecondition stored in the plugin com.ibm.team.workitem.service.
The class has to be an implementation of IOperationAdvisor, the plugin must extend the extension point "com.ibm.team.process.service.operationAdvisors" and the "com.ibm.team.repository.common.components".
# Follow-up
========
For the follow up action, you can check out our workshop http://jazz.net/library/article/477. It adds a follow up action on the save work item event.
I hope it will help
Hi Philippe,
Sorry for misleading you in the question. I went through that articles and I already have running pre-conditions and follow up actions.
I am rephrasing my question:
I have 4 States (S1, S2, S3, S4) and 3 actions (a1, a2, a3)
Here is the flow definition:
a1 : S1 -> S2
a2 : S2 -> S3
a3 : S2 -> S4
When I take action a1, Before the state became S2, a pre-condition will run. then, WI will be in state S2. At same state, a follow-up action will run and check a flag in work item and depending on the flag, follow-up action will take action a2 and set state to S3 or not.
Is that possible?
Can I set state of a workitem in a follow-up action? If yes, can you provide appropriate API for this?
Thank you,
Sorry for misleading you in the question. I went through that articles and I already have running pre-conditions and follow up actions.
I am rephrasing my question:
I have 4 States (S1, S2, S3, S4) and 3 actions (a1, a2, a3)
Here is the flow definition:
a1 : S1 -> S2
a2 : S2 -> S3
a3 : S2 -> S4
When I take action a1, Before the state became S2, a pre-condition will run. then, WI will be in state S2. At same state, a follow-up action will run and check a flag in work item and depending on the flag, follow-up action will take action a2 and set state to S3 or not.
Is that possible?
Can I set state of a workitem in a follow-up action? If yes, can you provide appropriate API for this?
Thank you,
What you are talking about is a scripted series of actions and state transitions. You could do this with some sort of script, but I don't think that this is what you want.
I think you would need to create a process extension to provide a participant for the Event Handling (Work Item State Changed Event) that would create an event follow up action. I see the event in the version of RTC that i am using right now, but there are no configured follow up actions. This tells me that you would be able to create an extension point for this.
I think you would need to create a process extension to provide a participant for the Event Handling (Work Item State Changed Event) that would create an event follow up action. I see the event in the version of RTC that i am using right now, but there are no configured follow up actions. This tells me that you would be able to create an extension point for this.
What you are talking about is a scripted series of actions and state transitions. You could do this with some sort of script, but I don't think that this is what you want.
I think you would need to create a process extension to provide a participant for the Event Handling (Work Item State Changed Event) that would create an event follow up action. I see the event in the version of RTC that i am using right now, but there are no configured follow up actions. This tells me that you would be able to create an extension point for this.
Hi Daniel,
Thanks for the answer,
I have a follow-up action that is attached to work item save operation. (I wrote the action and bound it to work item save operation). I will extend that follow up action. what I would like to do is:
If the work item is the item I want and if the state is s2,
check the flag, if set,
set state of the work item to s3
I'm done till the last statement. I just need the appropriate API to the last line that sets state of the work item.