Search in sources :

Example 1 with LanePropertyWriter

use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.LanePropertyWriter in project kie-wb-common by kiegroup.

the class LaneConverter method toElement.

public Result<LanePropertyWriter> toElement(Node<View<? extends BPMNViewDefinition>, ?> node) {
    return NodeMatch.fromNode(BPMNViewDefinition.class, LanePropertyWriter.class).when(Lane.class, n -> {
        org.eclipse.bpmn2.Lane lane = bpmn2.createLane();
        lane.setId(n.getUUID());
        LanePropertyWriter p = propertyWriterFactory.of(lane);
        Lane definition = n.getContent().getDefinition();
        BPMNGeneralSet general = definition.getGeneral();
        lane.setName(general.getName().getValue());
        p.setDocumentation(general.getName().getValue());
        p.setBounds(n.getContent().getBounds());
        return p;
    }).ignore(Object.class).apply(node);
}
Also used : LanePropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.LanePropertyWriter) Lane(org.kie.workbench.common.stunner.bpmn.definition.Lane) Factories.bpmn2(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) BPMNViewDefinition(org.kie.workbench.common.stunner.bpmn.definition.BPMNViewDefinition)

Aggregations

Factories.bpmn2 (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2)1 LanePropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.LanePropertyWriter)1 BPMNViewDefinition (org.kie.workbench.common.stunner.bpmn.definition.BPMNViewDefinition)1 Lane (org.kie.workbench.common.stunner.bpmn.definition.Lane)1 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)1