Search in sources :

Example 1 with GatewayPropertyWriter

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

the class GatewayConverter method inclusive.

private PropertyWriter inclusive(Node<View<InclusiveGateway>, ?> n) {
    org.eclipse.bpmn2.InclusiveGateway gateway = bpmn2.createInclusiveGateway();
    GatewayPropertyWriter p = propertyWriterFactory.of(gateway);
    gateway.setId(n.getUUID());
    InclusiveGateway definition = n.getContent().getDefinition();
    p.setGatewayDirection(n);
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    GatewayExecutionSet executionSet = definition.getExecutionSet();
    p.setDefaultRoute(executionSet.getDefaultRoute().getValue());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : InclusiveGateway(org.kie.workbench.common.stunner.bpmn.definition.InclusiveGateway) GatewayPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.GatewayPropertyWriter) Factories.bpmn2(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) GatewayExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.gateway.GatewayExecutionSet)

Example 2 with GatewayPropertyWriter

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

the class GatewayConverter method exclusive.

private PropertyWriter exclusive(Node<View<ExclusiveGateway>, ?> n) {
    org.eclipse.bpmn2.ExclusiveGateway gateway = bpmn2.createExclusiveGateway();
    GatewayPropertyWriter p = propertyWriterFactory.of(gateway);
    gateway.setId(n.getUUID());
    ExclusiveGateway definition = n.getContent().getDefinition();
    p.setGatewayDirection(n);
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    GatewayExecutionSet executionSet = definition.getExecutionSet();
    p.setDefaultRoute(executionSet.getDefaultRoute().getValue());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : ExclusiveGateway(org.kie.workbench.common.stunner.bpmn.definition.ExclusiveGateway) GatewayPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.GatewayPropertyWriter) Factories.bpmn2(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) GatewayExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.gateway.GatewayExecutionSet)

Example 3 with GatewayPropertyWriter

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

the class GatewayConverter method parallel.

private PropertyWriter parallel(Node<View<ParallelGateway>, ?> n) {
    org.eclipse.bpmn2.ParallelGateway gateway = bpmn2.createParallelGateway();
    GatewayPropertyWriter p = propertyWriterFactory.of(gateway);
    gateway.setId(n.getUUID());
    ParallelGateway definition = n.getContent().getDefinition();
    p.setGatewayDirection(n);
    BPMNGeneralSet general = definition.getGeneral();
    p.setName(general.getName().getValue());
    p.setDocumentation(general.getDocumentation().getValue());
    p.setBounds(n.getContent().getBounds());
    return p;
}
Also used : GatewayPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.GatewayPropertyWriter) ParallelGateway(org.kie.workbench.common.stunner.bpmn.definition.ParallelGateway) Factories.bpmn2(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)

Aggregations

Factories.bpmn2 (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2)3 GatewayPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.GatewayPropertyWriter)3 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)3 GatewayExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.gateway.GatewayExecutionSet)2 ExclusiveGateway (org.kie.workbench.common.stunner.bpmn.definition.ExclusiveGateway)1 InclusiveGateway (org.kie.workbench.common.stunner.bpmn.definition.InclusiveGateway)1 ParallelGateway (org.kie.workbench.common.stunner.bpmn.definition.ParallelGateway)1