Send a notification email after a work item is newly created
I want to send an email only when a work item is completely created (i.e. all preconditions and follow-up actions have passed successfully).
|
Accepted answer
Ralph Schoon (63.6k●3●36●47)
| answered Jul 10 '17, 11:06 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER You can create a followup action. It is pretty easy to detect that a work item is new. The extensions Workshop has some code for it already.
Krasimir Malchev selected this answer as the correct answer
Comments
Krasimir Malchev
commented Jul 28 '17, 8:45 a.m.
In case option number 1 is selected and I create a participant and send an email in case a new work item is created, how can I be sure that I will not send an email and them another participant fails (executed after mine) which can prevent from saving the work item?
The order is the order the behavior is configured for the operation and role from top to bottom.
Krasimir Malchev
commented Jul 31 '17, 2:26 a.m.
Just for confirmation, the only way to ensure that I send an email to a user right after a work item has just been created is to put my participant in the end of all follow-up actions list?
That is, there is no other mechanism to determine if the work item is saved just like the subscription feature which sends emails as soon as a given action is executed (completed with success).
I am sure there are other mechanisms that can be used, but I don't have any particular information about them. I can only answer what I know.
Krasimir Malchev
commented Jul 31 '17, 4:30 a.m.
Thanks a lot!
For the time being, this solution works for us :-)
|
One other answer
One option you could consider is looking at the "AdditionalSaveParameter" value of the saveWorkItem3 operation in the follow-up actions. If each follow-up action passes along its own unique id but preserves the ones that it received, then your final follow-up action could review all those save parameters and only send the e-mail if all of the expected parameters are present. If all parameters are present, that would indicate that all follow-up actions have fired.
For this to work, you'd have to have a comprehensive list of all the unique ids being passed along in the AdditionalSaveParameter by each follow-up action.
Comments
Krasimir Malchev
commented Jul 30 '17, 7:10 a.m.
Thank you for your proposal!
Unfortunately I am not able to apply it in my particular case as there are several advisors and participants enabled which are both custom and out of the box. I cannot change the last ones.
|
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.