protected void visitParameters(WorkItemNode workItemNode, StringBuilder xmlDump) { super.visitParameters(workItemNode, xmlDump); HumanTaskNode humanTaskNode = (HumanTaskNode) workItemNode; String swimlane = humanTaskNode.getSwimlane(); if (swimlane != null) { xmlDump.append("swimlane=\"" + swimlane + "\" "); } }
private void visitLane(NodeContainer container, String lane, StringBuilder xmlDump) { for (Node node: container.getNodes()) { if (node instanceof HumanTaskNode) { String swimlane = ((HumanTaskNode) node).getSwimlane(); if (lane.equals(swimlane)) { xmlDump.append(" <flowNodeRef>" + XmlBPMNProcessDumper.getUniqueNodeId(node) + "</flowNodeRef>" + EOL); } } else { String swimlane = (String) node.getMetaData().get("Lane"); if (lane.equals(swimlane)) { xmlDump.append(" <flowNodeRef>" + XmlBPMNProcessDumper.getUniqueNodeId(node) + "</flowNodeRef>" + EOL); } } if (node instanceof NodeContainer) { visitLane((NodeContainer) node, lane, xmlDump); } } }
public void triggerCompleted(WorkItem workItem) { String swimlaneName = getHumanTaskNode().getSwimlane(); SwimlaneContextInstance swimlaneContextInstance = getSwimlaneContextInstance(swimlaneName); if (swimlaneContextInstance != null) { String newActorId = (String) workItem.getResult("ActorId"); if (newActorId != null) { swimlaneContextInstance.setActorId(swimlaneName, newActorId); } } super.triggerCompleted(workItem); } }
protected String assignWorkItem(WorkItem workItem) { String actorId = null; // if this human task node is part of a swimlane, check whether an actor // has already been assigned to this swimlane String swimlaneName = getHumanTaskNode().getSwimlane(); SwimlaneContextInstance swimlaneContextInstance = getSwimlaneContextInstance(swimlaneName); if (swimlaneContextInstance != null) { actorId = swimlaneContextInstance.getActorId(swimlaneName); workItem.setParameter("SwimlaneActorId", actorId); } // if no actor can be assigned based on the swimlane, check whether an // actor is specified for this human task if (actorId == null) { actorId = (String) workItem.getParameter("ActorId"); if (actorId != null && swimlaneContextInstance != null && actorId.split(separator).length == 1) { swimlaneContextInstance.setActorId(swimlaneName, actorId); workItem.setParameter("SwimlaneActorId", actorId); } } // always return ActorId from workitem as SwimlaneActorId is kept as separate parameter return (String) workItem.getParameter("ActorId"); }
protected void visitParameters(WorkItemNode workItemNode, StringBuilder xmlDump) { super.visitParameters(workItemNode, xmlDump); HumanTaskNode humanTaskNode = (HumanTaskNode) workItemNode; String swimlane = humanTaskNode.getSwimlane(); if (swimlane != null) { xmlDump.append("swimlane=\"" + swimlane + "\" "); } }
private void visitLane(NodeContainer container, String lane, StringBuilder xmlDump) { for (Node node: container.getNodes()) { if (node instanceof HumanTaskNode) { String swimlane = ((HumanTaskNode) node).getSwimlane(); if (lane.equals(swimlane)) { xmlDump.append(" <flowNodeRef>" + XmlBPMNProcessDumper.getUniqueNodeId(node) + "</flowNodeRef>" + EOL); } } else { String swimlane = (String) node.getMetaData().get("Lane"); if (lane.equals(swimlane)) { xmlDump.append(" <flowNodeRef>" + XmlBPMNProcessDumper.getUniqueNodeId(node) + "</flowNodeRef>" + EOL); } } if (node instanceof NodeContainer) { visitLane((NodeContainer) node, lane, xmlDump); } } }
public void triggerCompleted(WorkItem workItem) { String swimlaneName = getHumanTaskNode().getSwimlane(); SwimlaneContextInstance swimlaneContextInstance = getSwimlaneContextInstance(swimlaneName); if (swimlaneContextInstance != null) { String newActorId = (String) workItem.getResult("ActorId"); if (newActorId != null) { swimlaneContextInstance.setActorId(swimlaneName, newActorId); } } super.triggerCompleted(workItem); } }
protected String assignWorkItem(WorkItem workItem) { String actorId = null; // if this human task node is part of a swimlane, check whether an actor // has already been assigned to this swimlane String swimlaneName = getHumanTaskNode().getSwimlane(); SwimlaneContextInstance swimlaneContextInstance = getSwimlaneContextInstance(swimlaneName); if (swimlaneContextInstance != null) { actorId = swimlaneContextInstance.getActorId(swimlaneName); workItem.setParameter("SwimlaneActorId", actorId); } // if no actor can be assigned based on the swimlane, check whether an // actor is specified for this human task if (actorId == null) { actorId = (String) workItem.getParameter("ActorId"); if (actorId != null && swimlaneContextInstance != null && actorId.split(separator).length == 1) { swimlaneContextInstance.setActorId(swimlaneName, actorId); workItem.setParameter("SwimlaneActorId", actorId); } } // always return ActorId from workitem as SwimlaneActorId is kept as separate parameter return (String) workItem.getParameter("ActorId"); }