Skip to main content

We have encountered an issue while testing a parallel flow. When parallel flow is already started and the main flow of the application encounters an error, the parallel flow activity also expires and the user cannot execute it anymore. The bug here is that the parallel flow activity should still be available even if there is an error from the main flow.

This incorrect behaviour is due to the workflow level exception rule in where we perform “GotoActivity” by sending “expire all” parameter as true.11870i50BEC9A75C81F85D.png
 

As per the documentation we found for K2, if we send false instead of true, only the current activity will be expired instead of all the activities.
                          ServerEvent.GotoActivity(eventName, False);

However, when we tried after setting the parameter as false, we found that only current activity was expired and parallel flow was still active but the main flow of the application proceeded further even though it should have stopped there.

 

Can someone please help us in finding a solution for this scenario as the issue is due to K2 behaviour and contradictory to their documentation.

Hi K2 Developer;

 

I'm not certain to which documentation are you following, could you please drill into this one parhaps you will get near your solution if not solution (https://help.k2.com/kb000105)

 

 

Should you find the content from the above article useful kindly Mark such as "Kudo and or Accepted Solution", as this will assist other community members encountering similar issues.

 

Kind regards;

Widson.


Unfortunately, I've found GoTo Activity to always be problematic with parallel activities. I try to design my workflow with safe "restart points" so that if things go awry, I use GoTo Activity to take me to these points which reset any data fields and restart parallel processes properly. It isn't ideal, as parallel steps that already started get re-started (users get new tasks and/or notifications) but it is something that shouldn't happen often, only in event of an unexpected error.


Reply