Search in sources :

Example 26 with Lane

use of org.eclipse.bpmn2.Lane in project kie-wb-common by kiegroup.

the class ProcessConverterDelegateTest method mockLane.

private static Lane mockLane(String id, String name, FlowNode... children) {
    Lane lane = new LaneMock(Arrays.asList(children));
    lane.setId(id);
    lane.setName(name);
    return lane;
}
Also used : Lane(org.eclipse.bpmn2.Lane)

Example 27 with Lane

use of org.eclipse.bpmn2.Lane in project kie-wb-common by kiegroup.

the class ProcessConverterDelegateTest method mockLaneSet.

private static LaneSet mockLaneSet(String name, Lane... children) {
    LaneSet laneSet = mock(LaneSet.class);
    laneSet.setName(name);
    when(laneSet.getName()).thenReturn(name);
    when(laneSet.getLanes()).thenReturn(Arrays.asList(children));
    return laneSet;
}
Also used : LaneSet(org.eclipse.bpmn2.LaneSet)

Example 28 with Lane

use of org.eclipse.bpmn2.Lane in project kie-wb-common by kiegroup.

the class ProcessPropertyWriter method addLaneSet.

public void addLaneSet(Collection<LanePropertyWriter> lanes) {
    if (lanes.isEmpty()) {
        return;
    }
    LaneSet laneSet = bpmn2.createLaneSet();
    List<org.eclipse.bpmn2.Lane> laneList = laneSet.getLanes();
    lanes.forEach(l -> laneList.add(l.getElement()));
    process.getLaneSets().add(laneSet);
    lanes.forEach(l -> {
        this.childElements.put(l.getElement().getId(), l);
        addChildShape(l.getShape());
    });
}
Also used : LaneSet(org.eclipse.bpmn2.LaneSet)

Aggregations

Lane (org.eclipse.bpmn2.Lane)17 SubProcess (org.eclipse.bpmn2.SubProcess)13 AdHocSubProcess (org.eclipse.bpmn2.AdHocSubProcess)12 LaneSet (org.eclipse.bpmn2.LaneSet)12 Process (org.eclipse.bpmn2.Process)11 RootElement (org.eclipse.bpmn2.RootElement)11 FlowElement (org.eclipse.bpmn2.FlowElement)10 ArrayList (java.util.ArrayList)9 FlowNode (org.eclipse.bpmn2.FlowNode)8 ItemDefinition (org.eclipse.bpmn2.ItemDefinition)5 Message (org.eclipse.bpmn2.Message)5 Bounds (org.eclipse.dd.dc.Bounds)5 Entry (java.util.Map.Entry)4 Error (org.eclipse.bpmn2.Error)4 Escalation (org.eclipse.bpmn2.Escalation)4 FlowElementsContainer (org.eclipse.bpmn2.FlowElementsContainer)4 Signal (org.eclipse.bpmn2.Signal)4 SimpleFeatureMapEntry (org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.SimpleFeatureMapEntry)4 FeatureMap (org.eclipse.emf.ecore.util.FeatureMap)4 Test (org.junit.Test)4