Why is the status of my workflow still RUNNING after throwing a WorkflowException? | Community
Skip to main content
Level 2
March 28, 2024
Solved

Why is the status of my workflow still RUNNING after throwing a WorkflowException?

  • March 28, 2024
  • 2 replies
  • 860 views

I created a custom Process Step in my workflow and checked "Handler Advance" & "Do not retry workflow job on failure" in the workflow properties.

When this Process Step encounters an error, it throws a WorkflowException.

However, even after throwing the WorkflowException, the status of my workflow remains RUNNING.

Is this normal?

How do I handle WorkflowException correctly?

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 TarunKumar

Hi @charlie_yc ,

By default AEM set the max retries count on failure  in Apache Sling Job Default Queue. So, even after failure it retries to complete it might not be useful in this case but many other OOTB workflows needs to be retried.
If you want to customize it then use your custom process and add check for retries count  by counter variable in workflow metadata.


Thanks
Tarun

2 replies

TarunKumar
Community Advisor
TarunKumarCommunity AdvisorAccepted solution
Community Advisor
April 10, 2024

Hi @charlie_yc ,

By default AEM set the max retries count on failure  in Apache Sling Job Default Queue. So, even after failure it retries to complete it might not be useful in this case but many other OOTB workflows needs to be retried.
If you want to customize it then use your custom process and add check for retries count  by counter variable in workflow metadata.


Thanks
Tarun

kautuk_sahni
Community Manager
Community Manager
June 10, 2024

@charlie_yc Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni