From a best practice perspective we generally to suggest avoiding modeling those kinds of system errors - error management is best done from cockpit (or some other greater scope). There are a few reasons why we suggest this but the most obvious one is that there are so many things that could go wrong in a process it becomes impossible to keep track of all “safe guards” you might want to model.
Well I’ve thought of three ideas that are worth considering -
-
Use a gateway.
Instead of letting the script error - you could catch the error and set a process variable with the status of how the script went. then test it to see what should be done next. Then a sequence flow could send the user where they want to go. -
Use a boundary event on the scrip task
If you catch the error on the task itself you’ll still have the context of the whole sub-process so they’ll be easier. to have a sequence flow move the token to a variety of tasks dependent on user input. -
Use CMMN for the processes
CMMN has a lot more power when it comes to activating tasks based on user input and doesn’t require sequence flows. .
If you’re still interested in using the process instance migration just let me know what issue you’re having with your current approach and I’ll try and help you out.