assertNotNull(task.getTaskMgmtDefinition());
assertSame(processDefinition.getTaskMgmtDefinition(), task.getTaskMgmtDefinition());
}
public void testTaskSwimlane() {
ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
"<process-definition>" +
" <swimlane name='butler' />" +
" <task-node name='saturday afternoon'>" +
" <task name='wash car' swimlane='butler' />" +
" </task-node>" +
"</process-definition>"
);
processDefinition = saveAndReload(processDefinition);
TaskMgmtDefinition taskMgmtDefinition = processDefinition.getTaskMgmtDefinition();
Swimlane butler = taskMgmtDefinition.getSwimlane("butler");
TaskNode taskNode = (TaskNode) processDefinition.getNode("saturday afternoon");
Task task = taskNode.getTask("wash car");
assertNotNull(task.getSwimlane());
assertSame(butler, task.getSwimlane());
}