issue with Workflow advance.
I'm also looking at using the workflow java API's to move/start the workflows. However using the API's i'm facing some strange behaviour.
Please find attached the WorkflowManager class that i make use of.
I'm using a 5 participant step workflow model. I first start the workflow using the startWorkflow method there.
This start the workflow and creates the node at etc/workflow/instances/<DATE> folder, something like /etc/workflow/instances/2014-01-13/model_459346895847903. Under this i get the workitems, something like /etc/workflow/instances/2014-01-13/model_459346895847903/workItems/node1_etc_workflow_instances_2014-01-13_model_459346895847903
I then login using the id to which the workflow step is assigned to and use the advanceWorkflowToNextStep method there API to advance it to the next step.
Strangely after this i get two nodes under the workflowItems node. Something like:
/etc/workflow/instances/2014-01-13/model_459346895847903/workItems/node1_etc_workflow_instances_2014-01-13_model_459346895847903
/etc/workflow/instances/2014-01-13/model_459346895847903/workItems/node2_etc_workflow_instances_2014-01-13_model_459346895847903
And for the first user the workfItem is still active even though i called the complete API using that user session.
Any ideas why this is happening. Ideally i would be expecting only a single node under workflowItem which would get updated with the status and the workitem for the previoulsy approved user to show nothing.