Skip to main content

I have a main workflow that calls a sub process ung IPC event.

When the sub process encountered an error, the main workflow does not, how do I make the main workflow error once the sub process encountered an error?

anyone?


I believe what you want to do is possible but the only way I can think of doing it is pretty convoluted.  Perhaps all you want is to make the error more discoverable.  If that's the case you can follow an approach like the one described in the below link that will you notifications if the child or parent has gone into error so you can resolve it often before the users are even aware there is a problem:

 

http://community.k2.com/t5/K2-blackpearl/Email-notification-when-process-goes-into-error-state/td-p/41423

or

http://community.k2.com/t5/General-K2-Utilities/K2-Process-Error-Notification-Service-Version-3-K2-PENS/ba-p/65970

 

Otherwise (high level description that I haven’t tested out but believe would work):

  1. In the parent draw a line leading from the Start activity to an activity with a client event named something like "Catch Error".  Assign the destination user to the K2 service account.
  2. In the "Catch Error" activity add a default server event after the client event and add code to make it go into error like y=1/0; type of thing.
  3. In the child add process error handling that would finish the "Catch Error" activity (code against the K2 API) which would cause it to go the server event which would cause the parent to go into error. Note the error of course would be different than the child error but perhaps you could pass the error description into a datafield of the parent when you finish the "Catch Error" activity.

 

 


Reply