Expand my Community achievements bar.


Scheduling activation on custom workflow


Level 4

Dear community fellows,


I am now creating a workflow with scheduling activation function and I mainly refered to these:

Configure Schedule Publish in Content Approval Workflow 


Scheduled activation with workflows 


accoding to the reference above, I added three processes/steps on my workflow:



1. Dialog Participant Step (this is to introduce in datepicker and set activation date on payload page)

2. Process Step which captures the date value and sets it to workflow instance metadata property (absoluteTime)

3. Participant Step (Waiting for activation) set timeout "Immediate" and Timeout handler "Absolute Time Auto Advancer",

so the step will wait until the scheduled time is reached and proceed to the next step.


1 and 2 worked fine and I did set the absoluteTime on my workflow instance metadata:




However, the workflow keeps running without getting into step 3.

Take OOTB scheduled_activation workflow as an example,

after triggering, the workitem node shows the current step is "Waiting for activation"




But there is nothing under my workitems, means the workflow didn't proceed to "Waiting for activation" step.




Should I re-arrange workflow processes/steps or can I programmatically make the step proceed?

Any thoughts are welcome

1 Accepted Solution


Correct answer by
Community Advisor



Did you check the Handler Advance in process step?



View solution in original post

4 Replies


Level 5

@YuSheng  - Change the sequence of workflow and Approval Process add absoluteTime to workflowData....




item.getWorkflowData().getMetaDataMap().put("absoluteTime", millis); 



Level 4

@manjunathdj Thanks for the reply


I did add "absoluteTime" successfully to the workflow metadata (code snippet below), but it did not proceed to participant step (waiting for activation). it seems there is a breach between my Process Step (sets absoluteTime property) and Participant Step (waiting for activation).


I tried swapping Waiting for activation and Approve content like you suggested, but it didn't work.


The reason I put Approve content under Waiting for activation is that I hope the approver see the content only when schedule date is due.




ResourceResolver resolver = workflowSession.adaptTo(ResourceResolver.class);
Resource payloadResource = resolver.getResource(payloadPath + "/jcr:content");
ValueMap resourceValueMap = payloadResource.getValueMap();

Calendar calendar = (Calendar) resourceValueMap.get("scheduleddate",Calendar.class);


Correct answer by
Community Advisor



Did you check the Handler Advance in process step?