Hi,
I want to set a different timeout for a participant step in a workflow for different instances of the workflow running on different payloads. For e.g. I want to set a timeout of 2 hours for 1 instance of a workflow running on payload A. And for another instance of the same workflow on a different payload, Payload B, I want to set the timeout as 3 hours.Please tell if anybody has any pointers on this.
Solved! Go to Solution.
Views
Replies
Total Likes
Hmmm... Sorry I misunderstood run mode with workflow instance.
You can write a new class which extends from AutoAdvance and implements the AbsoluteTimeoutHandler interface[1] & in getTimeoutDate have method like [2] & can avoid OR split.
[1] http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/workflow/job/AbsoluteTimeoutHandler.html
[2]
if (isPayLoadA()) {
return 10 min;
} else if (isPayLoadB()) {
return 15 min;
}
else {
return -1; // timeout now
}
Views
Replies
Total Likes
Utilize runmode config here.
Views
Replies
Total Likes
runmode config will not help here. It's changing the configuration parameters for a CQ instance. I am talking here about a workflow instance.
Views
Replies
Total Likes
Why not? Unless i misunderstood your requirement. Implement the osgi bundle with the AbsoluteTimeoutHandler & in the bundle you can get run mode parameter.
Views
Replies
Total Likes
Hi Sham,
If I am not wrong his requirement is adding 2 participant steps (they will be in or split) in the same work flow which has 2 different timeouts. Based on the payload some times it has to take right step and some times it will go through left step. I tried this but by default it is taking latest instance timeout setting and it is not completing previous instances.
Below are the logs in time out. My understanding is, it is taking only latest timout settings per workflow.
In a nutshell can we have more than one step with different timeouts?
Views
Replies
Total Likes
Hmmm... Sorry I misunderstood run mode with workflow instance.
You can write a new class which extends from AutoAdvance and implements the AbsoluteTimeoutHandler interface[1] & in getTimeoutDate have method like [2] & can avoid OR split.
[1] http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/workflow/job/AbsoluteTimeoutHandler.html
[2]
if (isPayLoadA()) {
return 10 min;
} else if (isPayLoadB()) {
return 15 min;
}
else {
return -1; // timeout now
}
Views
Replies
Total Likes
Views
Like
Replies