assertFalse(schedulerSession.findTimersByDueDate().hasNext());
}
public void testTimerAction() {
ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
"<process-definition name='process'>" +
" <start-state>" +
" <transition to='sometask' />" +
" </start-state>" +
" <task-node name='sometask'>" +
" <timer name='reminder'" +
" duedate='1 business minutes'" +
" repeat='1 business minutes'" +
" transition='time-out-transition' >" +
" <action class='my-action-handler-class-name' />" +
" </timer>" +
" <task name='do something'/>" +
" <transition name='time-out-transition' to='sometask' />" +
" </task-node>" +
"</process-definition>"
);
graphSession.saveProcessDefinition(processDefinition);
ProcessInstance processInstance = new ProcessInstance(processDefinition);
jbpmContext.save(processInstance);
newTransaction();
processInstance = graphSession.loadProcessInstance(processInstance.getId());
processInstance.signal();
processDefinition = processInstance.getProcessDefinition();
Iterator iter = processDefinition.getNode("sometask").getEvent("node-enter").getActions().iterator();
while (iter.hasNext()) {
Action action = (Action) iter.next();
action.getId();
}