private void assignLanes(RuleFlowProcess process, List<Lane> lanes) { List<String> laneNames = new ArrayList<String>(); Map<String, String> laneMapping = new HashMap<String, String>(); if (lanes != null) { for (Lane lane: lanes) { String name = lane.getName(); if (name != null) { Swimlane swimlane = new Swimlane(); swimlane.setName(name); process.getSwimlaneContext().addSwimlane(swimlane); laneNames.add(name); for (String flowElementRef: lane.getFlowElements()) { laneMapping.put(flowElementRef, name); } } } } assignLanes(process, laneMapping); }
public RuleFlowProcessFactory swimlane(String name) { Swimlane swimlane = new Swimlane(); swimlane.setName(name); getRuleFlowProcess().getSwimlaneContext().addSwimlane(swimlane); return this; }
process.getSwimlaneContext().addSwimlane(swimlane); swimlane = new Swimlane(); swimlane.setName("actor2"); process.getSwimlaneContext().addSwimlane(swimlane); assertEquals(2, process.getGlobals().size()); assertEquals(4, process.getVariableScope().getVariables().size()); assertEquals(2, process.getSwimlaneContext().getSwimlanes().size()); assertEquals(2, process.getExceptionScope().getExceptionHandlers().size());
private void assignLanes(RuleFlowProcess process, List<Lane> lanes) { List<String> laneNames = new ArrayList<String>(); Map<String, String> laneMapping = new HashMap<String, String>(); if (lanes != null) { for (Lane lane: lanes) { String name = lane.getName(); if (name != null) { Swimlane swimlane = new Swimlane(); swimlane.setName(name); process.getSwimlaneContext().addSwimlane(swimlane); laneNames.add(name); for (String flowElementRef: lane.getFlowElements()) { laneMapping.put(flowElementRef, name); } } } } assignLanes(process, laneMapping); }
public RuleFlowProcessFactory swimlane(String name) { Swimlane swimlane = new Swimlane(); swimlane.setName(name); getRuleFlowProcess().getSwimlaneContext().addSwimlane(swimlane); return this; }