It's all about the answers!

Ask a question

What's the difference between preconditions and follow-up actions for saving work items


Hongwu Wang (1836) | asked Nov 26 '14, 5:32 a.m.
edited Nov 26 '14, 5:33 a.m.
 This seems quite clear as the document stated like: Preconditions are checked before the save operation runs; follow-up actions are checked after the save operation.

However, when doing the RTC extension, I added a follow-up action and expect that the act will be done after the Work Item be saved. But the follow-up action will be always triggered during the save operation. Is there a way to do the follow-up action after the WI saved? Thanks.

Accepted answer


permanent link
sam detweiler (12.5k6195201) | answered Nov 26 '14, 8:39 a.m.
see the accepted answer here for some of my sample code that does this
https://jazz.net/forum/questions/156477/rtc-extension-participant

Hongwu Wang selected this answer as the correct answer

Comments
Hongwu Wang commented Nov 26 '14, 8:50 a.m.

 Thanks. i will try that.

One other answer



permanent link
sam detweiler (12.5k6195201) | answered Nov 26 '14, 8:16 a.m.
Both of these extensions happen during each transaction. (workitem save, source code deliver operations, etc)

the precondition  gives the extension the ability to stop the transaction before any data is saved
   the precondition cannot modify the proposed new data
the follow-up extension is triggered AFTER the data is saved, but before the transaction ends
   the follow-up cannot modify the data to be saved, however, it can cause ANOTHER transaction to modify the data
    ie (save it again)
 

Comments
Hongwu Wang commented Nov 26 '14, 8:34 a.m.

Hi Sam, Thanks for your answer. Could you give me some more details about how to trigger ANOTHER transaction to modify the data? Actually I want to change the WI data, like adding links, when saving the Work Item. Do you know how can I do that? Thanks again for your help. /Hongwu


Ralph Schoon commented Nov 26 '14, 8:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Also https://rsjazz.wordpress.com/2012/11/27/resolve-parent-if-all-children-are-resolved-participant/ as well as other follow up actions use this. As stated in the posts, you need to be a ware that a save will trigger another operation to be run and you might need to suppress that using with additional parameters.


sam detweiler commented Nov 26 '14, 10:09 a.m.

AND the 'other operation' also triggers the pre-condition, which COULD reject the save..

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.