// TODO: unable to access variableAccesses
node = newNode;
} else if (jPDLnode instanceof org.jbpm.graph.def.SuperState) {
org.jbpm.graph.def.SuperState jPDLsuperState =
(org.jbpm.graph.def.SuperState) jPDLnode;
SuperState newNode = new SuperState();
List<org.jbpm.graph.def.Node> nodes = jPDLsuperState.getNodes();
Map<org.jbpm.graph.def.Node, Node> mapping = new HashMap<org.jbpm.graph.def.Node, Node>();
for (org.jbpm.graph.def.Node nodeInsideSuperState : nodes) {
JpdlNode nodeToAdd = classifyNode(processDefinition, nodeInsideSuperState, swimlaneContext);
if (nodeToAdd == null) {
throw new IllegalArgumentException(
"Unknown node type: " + jPDLnode.getClass().getName() + " " + jPDLnode);
}
setDefaultNodeProperties(nodeInsideSuperState, (JpdlNode) nodeToAdd);
nodeToAdd.setId(++nodeId);
mapping.put(nodeInsideSuperState, nodeToAdd);
newNode.addNode(nodeToAdd);
}
generateConnections(mapping);
node = newNode;
} else if (jPDLnode instanceof org.jbpm.graph.node.TaskNode) {
org.jbpm.graph.node.TaskNode jPDLtaskNode =
(org.jbpm.graph.node.TaskNode) jPDLnode;
TaskNode newNode = new TaskNode();
Set<Task> tasks = jPDLtaskNode.getTasks();
newNode.setTasks(tasks);
newNode.setSignal(jPDLtaskNode.getSignal());
newNode.setCreateTasks(jPDLtaskNode.getCreateTasks());
newNode.setEndTasks(jPDLtaskNode.isEndTasks());
for (Task task : tasks) {
org.jbpm.taskmgmt.def.Swimlane jPDLswimlane = task.getSwimlane();
if (jPDLswimlane != null) {
String swimlaneName = jPDLswimlane.getName();
if (swimlaneContext.getSwimlane(swimlaneName) == null) {