Behavior of moveExecutionToActivityId


I currently am dealing with a workflow that has gotten ‘stuck’ in our system’s exception catcher for a service task, and need to figure out a way to cleanly revert it back to the last step before the service task so that we can let our users run through it again.

We do have it set up right now so that our error handler feeds back in to the service task, but this results in the workflow appearing as if it has just failed outright when we query the history. So, instead of leaving that as is I’m looking to try and use the moveExecutionToActivityId() function in the createChangeActivityStateBuilder() to manually push it back to our last user task step, but I’ve got some concerns over how this will handle our task history and if this is the best approach

Does using moveExecutionToActivityId() wipe out the previously existing task history, or does it just make a new task entry and treat the previous error handler task as completed? Are there any considerations for workflow integrity by doing this that would make this approach non-viable?

When changing the process state in this way, the the variables and history remain intact. History will show that the previous task was active and ended and that the new task was started.