Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

How do I enable workflow step timeouts?

Avatar

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

Avatar

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

Avatar

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

Avatar

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?

Avatar

Correct answer by
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. 

Avatar

Former Community Member

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