How do I enable workflow step timeouts? | Community
Skip to main content
New Participant
October 16, 2015
Solved

How do I enable workflow step timeouts?

  • October 16, 2015
  • 4 replies
  • 2906 views

Hi All.

I'm trying to get a workflow step to time out and advance to the next step via the Auto Advancer. However the workflow never advances.

I have a test with a couple of no-op process steps.  I'd like the first step to time out and automatically advance to the second step. For the first step I unchecked Handler Advance, set timeout to Immediate, and selected the Auto Advance timeout handler. However the workflow never advances past the first step.

Is there a workflow timeout service that's supposed to handle this? Or do I need to create my own service to locate and resume workflows?

I'm using AEM 5.6.1.

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 smacdonald2008

Yes -- that is one way to do it  -- the benefit of this is have complete control over the time. 

There is another way too as described here:

http://blogs.adobe.com/dmcmahon/2012/08/10/cq5-4-how-to-force-a-delay-in-between-workflow-steps/

Hope this helps. 

4 replies

smacdonald2008
New Participant
October 16, 2015

You can write your own Custom Step to do this. Make it configurable so it counts the secs to timeout and then advance to the next step. Learn how to write an AEM 5.6 custom workflow step here:

http://helpx.adobe.com/experience-manager/using/creating-custom-aem-workflow-steps.html

Place your Java logic to timeout the workflow in the execute method -- as shown in the previous article. You can always assign a node in the JCR to hold a timeout value and read that node from within the execute method. (as an example). 

New Participant
October 16, 2015

Thanks for the quick response.

So basically I create a workflow process that does a Thread.sleep() for some configurable amount of time. Is that correct?

smacdonald2008
smacdonald2008Accepted solution
New Participant
October 16, 2015

Yes -- that is one way to do it  -- the benefit of this is have complete control over the time. 

There is another way too as described here:

http://blogs.adobe.com/dmcmahon/2012/08/10/cq5-4-how-to-force-a-delay-in-between-workflow-steps/

Hope this helps. 

October 16, 2015

Hi,

I have a question. Writing custom workflow to manage time is always a better option.

But we have something in AEM 6.0 out of Box "Auto Advancer" and "Absolute Advance Auto Advancer" to send control to next step if timeout happens. What exactly is their purpose ? As I am using it but both are not working.

I am using AEM 6.0 and I created my own time out node for 1 minute under libs/workflow. I took time in milliseconds i.e. 60000

Thanks