Schedule Activation Through Custom Workflow in AEM 6.3
Hi,
I am creating a custom workflow which has the following steps in AEM 6.3 :-
1.Dialog participant Step --> This helps user to choose the Activation Date.
2. Process Step --> It saves the date selected in above step as "absoluteTime" in metadata of the workflow instance.
3. Participant Step --> Here I am selecting Timeout as Immediate and Timeout handler as "Absolute Time Auto Advancer" and assigning to admin.
4. Process Step --> Activate page.
But the when I starts the workflow it saves the "absoluteTime" property correctly but it doesn't stop at the second participant step(which is at 3) and workflow gets aborted as soon as it reaches the step 3. Can anyone please point out what wrong I am doing. Attaching the instance history and below is the code which I am using for saving absoluteTime
String contentPagePath = workItem.getWorkflowData().getPayload().toString();
Session session = workflowSession.adaptTo(Session.class);
ResourceResolver resourceResolver = getResourceResolver(session);
Resource resource = resourceResolver.getResource(contentPagePath + "/jcr:content");
ValueMap valueMap = resource.getValueMap();
Calendar calendar = valueMap.get("absoluteTime", Calendar.class);
workItem.getWorkflowData().getMetaDataMap().put("absoluteTime", calendar.getTimeInMillis());