It's all about the answers!

Ask a question

Issue in RTC Plugin followup action v/s Pre-Condition


Riddhi Shah (2721518) | asked Aug 10 '12, 2:39 a.m.
edited Aug 10 '12, 12:41 p.m. by Jared Burns (4.4k29)
Hi,

I have developed two plugins for my RTC Environment. 1. Pre-condition 2. Folllowup action.

My requirement is, If i update an RCN to "In Progress" state, I need to put some conditions and verify estimation of my task. And when I mark it as "Resolved" i need to check estimation field and on basis of some condition I need to automatically move my task to Closed state. So, update status to Close.

For validation of estimation I have created pre-condition plugin which gets executed before save operation.

For automatically moving status to "closed", I created followup action. But my followup action also gets executed before save. i.e. If I attach debugger to my plugin , and click on save , it comes to followup action plugin before actually saving state of task. Where I expect it to come after save operation. If my plugin fails in any case, it does not actually save the task as well.

In such case what it the difference between pre-condition and followup action if both comes before save operation.

for reference following is my plugin file:

   <extension
         point="com.ibm.team.process.service.operationParticipants">
      <operationParticipant
            class="fridaytest.FridayTestClass"
            id="FridayTest.operationParticipant1"
            name="friday test"
            operationId="com.ibm.team.workitem.operation.workItemSave">
         <extensionService
               componentId="FridayTest.extensionService"
               implementationClass="fridaytest.FridayTestClass">
            <prerequisites>
               <requiredService
                     interface="com.ibm.team.workitem.service.IWorkItemServer">
               </requiredService>
               <requiredService
                     interface="com.ibm.team.workitem.common.IWorkItemCommon">
               </requiredService>
            </prerequisites>
         </extensionService>
      </operationParticipant>
   </extension>



Comments
Jared Burns commented Aug 10 '12, 12:41 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Comment on the tagging of this question - This post was tagged with "jazzhub", "jazz.net", and "configuration", but it is not a question about any of those things. Please try not to overtag like this. I've replaced these tags with "workitems", "process", and "extending" since that's what the question is about.

Accepted answer


permanent link
Jared Burns (4.4k29) | answered Aug 10 '12, 12:39 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Aug 10 '12, 12:43 p.m.
I can say definitively that follow-up actions are executed *after* the operation they're attached to (I wrote the code).

If you're seeing a breakpoint in a follow-up action being hit before some other breakpoint, you should double-check the location of that other breakpoint. If you place a breakpoint inside the workitem save operation it will be hit before your follow-up action.
Riddhi Shah selected this answer as the correct answer

Comments
Riddhi Shah commented Aug 17 '12, 1:16 a.m.

I also tried to write followup action on-save using OperationParticipant. But whenever I run plugin and attach debugger to it , it comes to breakpoint before save only. Which is certainly true for all my plugins. If you can share some sample code , would be a great help on the path.

Your answer


Register or to post your answer.