Search in sources :

Example 6 with LaneSet

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

the class DIZorderComparator method isChildParent.

private boolean isChildParent(BaseElement parent, BaseElement child) {
    LaneSet childLaneSet = ((Lane) parent).getChildLaneSet();
    if (childLaneSet == null) {
        return false;
    }
    List<Lane> lanes = childLaneSet.getLanes();
    for (Lane lane : lanes) {
        if (isParent(lane, child)) {
            return true;
        }
    }
    return false;
}
Also used : Lane(org.eclipse.bpmn2.Lane) LaneSet(org.eclipse.bpmn2.LaneSet)

Example 7 with LaneSet

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

the class AbstractProcessConverter method convertLaneSets.

private void convertLaneSets(List<LaneSet> laneSets, Map<String, BpmnNode> freeFloatingNodes, BpmnNode firstDiagramNode) {
    laneSets.stream().flatMap(laneSet -> laneSet.getLanes().stream()).forEach(lane -> {
        BpmnNode laneNode = converterFactory.laneConverter().convert(lane);
        laneNode.setParent(firstDiagramNode);
        lane.getFlowNodeRefs().forEach(node -> {
            freeFloatingNodes.get(node.getId()).setParent(laneNode);
        });
    });
}
Also used : LinkedHashMap(java.util.LinkedHashMap) Result(org.kie.workbench.common.stunner.bpmn.backend.converters.Result) List(java.util.List) LaneSet(org.eclipse.bpmn2.LaneSet) Map(java.util.Map) TypedFactoryManager(org.kie.workbench.common.stunner.bpmn.backend.converters.TypedFactoryManager) BpmnNode(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.BpmnNode) ConverterFactory(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.ConverterFactory) DefinitionResolver(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.DefinitionResolver) FlowElement(org.eclipse.bpmn2.FlowElement) PropertyReaderFactory(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.PropertyReaderFactory) BpmnNode(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.BpmnNode)

Example 8 with LaneSet

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

the class SubProcessPropertyWriter method addLaneSet.

public void addLaneSet(List<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);
    });
}
Also used : LaneSet(org.eclipse.bpmn2.LaneSet)

Aggregations

LaneSet (org.eclipse.bpmn2.LaneSet)8 Lane (org.eclipse.bpmn2.Lane)5 ArrayList (java.util.ArrayList)3 AdHocSubProcess (org.eclipse.bpmn2.AdHocSubProcess)3 FlowElement (org.eclipse.bpmn2.FlowElement)3 FlowNode (org.eclipse.bpmn2.FlowNode)3 Process (org.eclipse.bpmn2.Process)3 RootElement (org.eclipse.bpmn2.RootElement)3 SubProcess (org.eclipse.bpmn2.SubProcess)3 List (java.util.List)2 Artifact (org.eclipse.bpmn2.Artifact)2 SequenceFlow (org.eclipse.bpmn2.SequenceFlow)2 BPMNDiagram (org.eclipse.bpmn2.di.BPMNDiagram)2 BPMNPlane (org.eclipse.bpmn2.di.BPMNPlane)2 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1 Association (org.eclipse.bpmn2.Association)1 BoundaryEvent (org.eclipse.bpmn2.BoundaryEvent)1 DataInputAssociation (org.eclipse.bpmn2.DataInputAssociation)1 DataObject (org.eclipse.bpmn2.DataObject)1