AEM Workflow Scheduled Activation.absoluteTime.. not working. Any suggestions..
Hello Team,
I am capturing the value of the absoluteTime from the dialog. and reading that value in the following process step and setting it to the workflow metadata. But even then it is not waiting for the time I mentioned in the absolute time..
Participant Step(dialog value of absoluteTime,AbsoluteTimeAutoAdvanceHandler) --> Process Step(setting the value in the workflow metadata,AbsoluteTimeAutoAdvanceHandler) --> No Process Step(AbsoluteTimeAutoAdvanceHandler) -->Activate(Activate Page Process step)-->SendEmailNotification(Process Step)
Not sure what I am doing wrong. but its not waiting for the time I set in the absoluteTime. I debugged and verified after setting the values in the process step where I am setting the values in the metadata and also by the time its coming to the sendemail process, workflowdata is having the metadata values I set. Any suggestions..
List<HistoryItem> historyList = session.getHistory(item.getWorkflow());int listSize = historyList.size(); HistoryItem lastItem = historyList.get(listSize-1); String type = lastItem.getWorkItem().getNode().getType();if (type != null && type.equals(WorkflowNode.TYPE_PARTICIPANT)) { String millis = lastItem.getWorkItem().getMetaDataMap().get("absoluteTime", String.class).toString().substring(0,19).replace("T"," "); //For now I am hardcoding the milliseconds value to test it. millis = "1468373400000";//data from last test time; 20:30 EST. item.getWorkflow().getMetaDataMap().put("absoluteTime", millis); item.getWorkflowData().getMetaDataMap().put("absoluteTime", millis); }