Hi all, According to my interpretation of the engine code [1], all unexpected and unhandled errors during node execution are currently intercepted and the process state is set to Error, but the process instance remains active to allow users to update the model and retrigger process instance execution. Although a clever approach to allow recovery of processes that uses do not want to execute again from start (they might have failed because there was a typo in a human task), this potentially creates a large number of idle process instances that are not going to be deleted from memory/db (depending if persistence is configured or not, in production it will be) unless the users manually abort them. If the user does not monitor them, this policy might jeopardize the performance of the whole application. I would like to explore the possibility of setting a timeout for process instances on error (that will be of course configurable). If the process instance has not been acted upon for a reasonable amount of time, it will be automatically aborted.
[1] https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/jbpm/jbpm-flow/src/main/java/org/jbpm/workflow/instance/impl/NodeInstanceImpl.java#L247-L251
