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

Setting state of work item in post-condition

Hi,
I would like to take a workflow action in post-condition of work item save operation. Is that possible? If yes can you please give information and an example from the appropriate API?
Thanks,

0 votes



4 answers

Permanent link
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

0 votes


Permanent link
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,

0 votes


Permanent link
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.

0 votes


Permanent link
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.

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: Mar 02 '11, 12:29 p.m.

Question was seen: 6,162 times

Last updated: Mar 02 '11, 12:29 p.m.

Confirmation Cancel Confirm