Expand my Community achievements bar.

SOLVED

issue with Workflow advance.

Avatar

Former Community Member

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.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

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.

View solution in original post

4 Replies

Avatar

Level 10

"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? 

Avatar

Employee

nitinkcv wrote...

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


Did you forget to attach the class?

Avatar

Correct answer by
Former Community Member

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.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----