It's all about the answers!

Ask a question

How to throw an exception in the Participant plugin? will the work item created if the participant fails?


lakshmi jyothsna (379) | asked Jul 27 '20, 1:08 a.m.

Hi every one,

 
When writing a participant plugin to link a newly created work item to a parent which meets certain conditions, how to throw an exception if the parent was not found  ? what could be the best option?  will the work item saves in the DB?

waiting for reply..
Thanks,
Jyothsna.

Accepted answer


permanent link
Ralph Schoon (62.3k33643) | answered Jul 27 '20, 2:54 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 These questions are all discussed and answered in https://jazz.net/library/article/1000 (lab 3). https://rsjazz.wordpress.com/2012/11/30/a-create-approval-work-item-save-participant/ shows also code for it. 


When you add a severity ERROR information to the information collector, the follow up action should prevent the save. As far as I understand , the whole preconditions and follow up actions are run in a transaction, that is also the reason, why pre-conditions and follow up actions should be fast.

lakshmi jyothsna selected this answer as the correct answer

Your answer


Register or to post your answer.