One of our Adobe tech partners has asked the following....
I’m currently developing an Osgi module for AEM. We are currently usingAEM 184.108.40.206and I’m experiencing an unexpected behavior while using workflows.
1. Create a simple workflow model with only one process step. The process step was implemented by me and packaged in the Osgi bundle
2. Launch the workflow
The workflow should be displayed in Workflow instances while running and in Workflow archive after a successful completion
I can see from logs that my custom workflow process step ran correctly and that the workflow is displayed in Workflow instances while running, but once completed it is neither in Workflow archive nor in Workflow failures. Moreover this misbehavior is not systematic because sometimes it happened that it was not even displayed in Workflow instances.
Here I’ve captured the node corresponding to the completed instance on CRXDE, which correctly shows the workflow as completed
I searched our bug tracker and I couldn't find a matching issue. However, I have seen some cases where somebody tries to terminate a workflow during an AEM restart and it picks up the Sling POST servlet instead of the workflow servlet. In these cases this node gets corrupted: /var/workflow/instances
To see if this is the cause and fix it, do the following: