Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How do I enable workflow step timeouts?

davidf46996755
Level 3
Level 3

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!

1 Accepted Solution
smacdonald2008
Correct answer by
Level 10
Level 10

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. 

View solution in original post

4 Replies
smacdonald2008
Level 10
Level 10

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). 

davidf46996755
Level 3
Level 3

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
Correct answer by
Level 10
Level 10

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. 

Anonymous
Not applicable

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