Complete Workflow step through code - using WorkflowSession not working in AEM6.5 | Community
Skip to main content
deepalakshmip35
Level 2
February 17, 2020
Solved

Complete Workflow step through code - using WorkflowSession not working in AEM6.5

  • February 17, 2020
  • 1 reply
  • 1335 views

I am trying to complete a workflow step through code in same step workflow processor as below.
workflowSession.complete(workItem, workflowSession.getRoutes(workItem, false).get(0));

here, it throws the exception:
Caused by: com.adobe.granite.workflow.WorkflowException: Unable to retrieve workflow instance: "/var/workflow/instances/...."

AEM version : AEM6.5, this working in AEM6.2
Is there anything need to be configured to WorkflowException?

I tried with system user provided all privileges and added it as a workflow super user but same the issue occurs on completing the workItem.
Please share solution if anyone faced this issue, advance thanks.

 

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 deepalakshmip35

I found it..

We cannot take ownership on workflow instance of transient workflow. Because these are executed in memory. 

 

To have workItem workflow should write nodes under /var/workflow/instances/server0/

With a transient workflow it is executed in memory.

1 reply

deepalakshmip35
deepalakshmip35AuthorAccepted solution
Level 2
February 25, 2020

I found it..

We cannot take ownership on workflow instance of transient workflow. Because these are executed in memory. 

 

To have workItem workflow should write nodes under /var/workflow/instances/server0/

With a transient workflow it is executed in memory.