Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Workflow are running even after completion

Avatar

Level 3

Hi There,

 

I have created a custom workflow, which when triggered gets the work done. However even after completion, its status shows running for indefinite time. I have gone through the documentation and it has end process as a last step. I have also tried closing resource resolver and logging out from Workflow session object, but nothing worked.

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

4 Replies

Avatar

Community Advisor

Hi @bagwanpankaj,

Can you confirm if:

that the "End" step is actually being reached in the workflow path.

  • Check the workflow model design in CRX/DE (/conf or /var/workflow/models) — if the flow conditionally skips the end step or has some custom logic that prevents reaching it, the workflow won’t end.

  • In your custom WorkflowProcess implementation, ensure you are not blocking the thread or entering an indefinite wait.
  • If you are manually closing:

    if (resolver != null && resolver.isLive()) {
        resolver.close();
    }
    
    if (session != null && session.isLive()) {
        session.logout();
    }
  • Sometimes, /var/workflow/instances might retain entries even after completion.


Santosh Sai

AEM BlogsLinkedIn


Avatar

Level 4

Hi @bagwanpankaj ,

Try to complete the workflow step through code as below,

workflowSession.complete(workItem, route);

route you can get it from workflowSession.getRoutes(workItem, false).get(0));

 

Thanks,

Avatar

Level 5

Hi @bagwanpankaj ,

You can check the following points:

  • Missing "End" step
    Make sure your workflow model ends with an explicit End step, otherwise AEM will keep it running.
  • Properly close ResourceResolver
    Use try-with-resources or ensure it's closed in a finally block.
  • Avoid manual session.logout()
    If your session comes from ResourceResolver, don’t call logout(), AEM handles that.
  • Check error logs
    Sometimes the answer is hiding right there, look for any exceptions or warnings in the logs.
  • Look for unintended loops
    Double-check the model design to ensure there are no circular transitions.

Let me know which of these you've already verified, happy to help you narrow it down!

Avatar

Administrator

@bagwanpankaj just checking in! Were you able to get this resolved? If one of the replies above helped—whether it completely solved the issue or simply pointed you in the right direction—marking it as accepted can make it much easier for others with the same question to find a solution. And if you found a different way to fix it, sharing your approach would be a great contribution to the community. Your follow-up not only helps close the loop but also ensures others benefit from your experience. Thanks so much for being part of the conversation!



Kautuk Sahni