It's all about the answers!

Ask a question

Pre/postOperation and WI usage


Zachary K (19354339) | asked Oct 01 '09, 3:15 p.m.
Hello,
I'm new to the Jazz environment development so please bear with me. I'm trying to understand what would be the easiest way to trigger operations/actions based on some context.

From what I understand I could use:
1) WorkItem with custom type, attribute and workflow. When a state changes can I invoke an custom operation? If so how can I do this?
2) Use pre/post Operations. I define a service and a set of operations with pre/post conditions.
3) Use Workitem and pre/post operations together. If so is there any "simple" example showing how to configure an advisor/participant when a workitem changes state?

Is it the proper thinking?

Thank you for your help in getting me started.

3 answers



permanent link
Patrick Streule (4.9k21) | answered Oct 03 '09, 5:58 a.m.
JAZZ DEVELOPER
Hello,
I'm new to the Jazz environment development so please bear with me.
I'm trying to understand what would be the easiest way to trigger
operations/actions based on some context.

From what I understand I could use:
1) WorkItem with custom type, attribute and workflow. When a state
changes can I invoke an custom operation? If so how can I do this?
2) Use pre/post Operations. I define a service and a set of operations
with pre/post conditions.
3) Use Workitem and pre/post operations together. If so is there any
"simple" example showing how to configure an
advisor/participant when a workitem changes state?

Is it the proper thinking?

Thank you for your help in getting me started.

An operation participant is the right way to participate in a work item
save operation and to execute your own code depending on e.g. the state of
the work item.

I don't think we have a simple documented example, but you could get the
source code of RTC and take a look at
com.ibm.team.workitem.service.internal.save.AllChildrenClosedPrecondition

This is an IOperationAdvisor, but the way how to get the work item, check
the state etc. is exactly the same as for an IOperationParticipant.


This document has information about registering your operation participant:
https://jazz.net/wiki/bin/view/Main/TeamProcessDeveloperGuide#Adding_New_Operation_Participant

You will also need to deploy you code once implemented. This is described
in:
https://jazz.net/wiki/bin/view/Main/UsingJazzProvisioner

Hope this helps.

--
Regards,
Patrick
Jazz Work Item Team

permanent link
Zachary K (19354339) | answered Oct 03 '09, 5:41 p.m.
Thanks Patrick that helps.
It's pointing me to the right direction...
I have one more question: If I want to contribute a participant or an advisor to the Category Work Item for the existing Save Work Item operation, I need to add an operationParticipants and operationAdvisors extensions in my manifest file. However, do I still need to contribute a new extension point com.ibm.team.process.client.configurationPoints, because I don't see my new added PreConditions and FollowUp action under Work Item?

Thanks in advance for your help.

permanent link
Zachary K (19354339) | answered Oct 03 '09, 5:59 p.m.
I got it. I simply needed to use the category com.ibm.team.workitem.category
Thanks....
Thanks Patrick that helps.
It's pointing me to the right direction...
I have one more question: If I want to contribute a participant or an advisor to the Category Work Item for the existing Save Work Item operation, I need to add an operationParticipants and operationAdvisors extensions in my manifest file. However, do I still need to contribute a new extension point com.ibm.team.process.client.configurationPoints, because I don't see my new added PreConditions and FollowUp action under Work Item?

Thanks in advance for your help.

Your answer


Register or 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.