Expand my Community achievements bar.

SOLVED

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

Avatar

Level 2

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?

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

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

Avatar

Administrator

@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