" <event type='process-start' />" +
" <action name='gotocheetahs' class='com.secret.LetsDoItSneeky'/>" +
"</process-definition>" );
graphSession.saveProcessDefinition(processDefinition);
ProcessInstance processInstance = new ProcessInstance(processDefinition);
Event event = processInstance.getProcessDefinition().getEvent("process-start");
Action action = processInstance.getProcessDefinition().getAction("gotocheetahs");
processInstance.addRuntimeAction(new RuntimeAction(event, action));
processInstance = saveAndReload(processInstance);
RuntimeAction runtimeAction = (RuntimeAction) processInstance.getRuntimeActions().get(0);
event = processInstance.getProcessDefinition().getEvent("process-start");
assertEquals(event.getGraphElement(), runtimeAction.getGraphElement());
assertEquals(event.getEventType(), runtimeAction.getEventType());
}