It's all about the answers!

Ask a question

Different follow up Plugin called multiple times for single work item


Anurag Patel (21262) | asked Sep 17 '18, 7:41 a.m.

 Hi,


I am using RTC 6.0.5 application and in CCM did some customisation.
I have created some of the plugins for Defect work item and my plugin are working as below:
1. Follow Up Plugin 1 : Can set the due date (Timestamp attribute)
2. Follow Up Plugin 2 : Can create a 3 task and link those task as a with children link type.

Seq-1 : Above 2 plugins are created for Defect type of work item and applied it with below sequence.
 - Follow Up Plugin 1
 - Follow Up Plugin 2

When I create the Defect and save it then 'Follow Up Plugin 2' plugin can called 2 times.

If i change the sequence of applied plugin i.e 
Seq-2 : 
 - Follow Up Plugin 2
 - Follow Up Plugin 1
Then it is working fine in Seq-2

Can any one know the reason why it is called 2 time in Seq-1 and creates 6 child task encase of 2 child task.

Thanks In advance.

One answer



permanent link
Ralph Schoon (63.1k33645) | answered Sep 17 '18, 8:10 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Sep 17 '18, 8:13 a.m.

 Best Guess:


If a follow up action saves a work item, that triggers the whole process of running the preconditions and follow up actions for this specific save. You can use the additional save parameters to pass a string to communicate the fact that this save is due to a follow up action. The follow up actions can use the parameter to determine if the need to run again or not. Subsequent follow up action calls can look for the parameter. If it is there, they know that this call is due to the save save run by the follow up action. They know that they don't have to run again and can terminate.

Note that you definitely want to protect yourself using this method, because otherwise you can end up in a recursion and crash RTC.


Comments
Anurag Patel commented Sep 18 '18, 7:37 a.m.

Thanks Ralph for your reply.

I have added additional save parameters to logic to multiple times save operation for the custom follow up action. 
Also I have created some other simple follow up action to check the working behaviour of  follow up action but still the result is same. 
As per my analysis this is due to multiple follow up actions for single work item these follow actions are called multiple times, when 1st follow up will save on that save operation other follow up actions are called. (Save parameters is exist but still follow up action called separately so that it does not have information of previously follow up save parameter).

Your answer


Register or to post your answer.