I have extended the workflow to split approval/publish into two different tasks.
However, if I restart the server after approving (and pre-publishing) the state is lost.
I notice in JcrPersistingProcessEventListener that the process state is persisted in beforeProcessCompleted/afterProcessCompleted when a process is started/finished.
However, for each individual task, how do we persist the process?
I've extended JcrPersistingProcessEventListener and persisted via afterNodeTriggered which does ultimately work, but is this the correct way? It's obviously called many more times than required as it's after ever ndoe trigger.