issue with Workflow advance. | Community
Skip to main content
October 16, 2015
Solved

issue with Workflow advance.

  • October 16, 2015
  • 4 replies
  • 1211 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by

I figured this issue out after banging my head for hours. I did not give the DELETE permissions (to the /etc/workflow/instances) for the user with which i started the workflow and moved the workflow to the next step. Once i gave this it started working

Thanks for your help on this.

4 replies

smacdonald2008
Level 10
October 16, 2015

"And for the first user the workfItem is still active even though i called the complete API using that user session."

IN your workflow -- are you saying that you start the workflow using APIs - however - the workflow is still running even despite the fact it should end? 

We have a community article that talks about setting up a basic workflow that deletes a node. You start the workflow using APIs. However - once the workflow is started using the API - the node is deleted and the workflow ends. See:

http://helpx.adobe.com/experience-manager/using/invoking-experience-manager-workflows-using.html

In your workflow  - you are not seeing similar results. That is - your workflow is not ending? 

October 16, 2015

Any ideas guys?

Adobe Employee
October 16, 2015

nitinkcv wrote...

Please find attached the WorkflowManager class that i make use of.


Did you forget to attach the class?

Accepted solution
October 16, 2015

I figured this issue out after banging my head for hours. I did not give the DELETE permissions (to the /etc/workflow/instances) for the user with which i started the workflow and moved the workflow to the next step. Once i gave this it started working

Thanks for your help on this.