How does Activiti handle exceptions?

< H2 > how to deal with the early termination of the process due to exceptions in activiti? < / H2 >

for example, I need to enter a variable in a usertask. If the variable is 1, then the process to usertask1,; if it is 2, then there are only two paths from the process to usertask2, but if you enter 3, then the process ends directly?

what to do when entering a variable value that does not meet the requirements or when there is an exception, so as not to let the process close directly, but to return to the previous usertask or other exception handling?

Mar.30,2021

check out the state machine.

according to your description in the second paragraph, you can use the stack to save the current state. When an exception occurs or an illegal variable is encountered, you can roll back the stack to roll back the previous state (that is, usertask )

.
Menu