Search in sources :

Example 1 with GatewayExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.gateway.GatewayExecutionSet 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 GatewayExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.gateway.GatewayExecutionSet in project kie-wb-common by kiegroup.

the class GatewayConverter method inclusiveGateway.

private BpmnNode inclusiveGateway(Gateway gateway) {
    Node<View<InclusiveGateway>, Edge> node = factoryManager.newNode(gateway.getId(), InclusiveGateway.class);
    InclusiveGateway definition = node.getContent().getDefinition();
    GatewayPropertyReader p = propertyReaderFactory.of(gateway);
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setExecutionSet(new GatewayExecutionSet(new DefaultRoute(p.getDefaultRoute())));
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    return BpmnNode.of(node);
}
Also used : InclusiveGateway(org.kie.workbench.common.stunner.bpmn.definition.InclusiveGateway) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) DefaultRoute(org.kie.workbench.common.stunner.bpmn.definition.property.gateway.DefaultRoute) GatewayPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.GatewayPropertyReader) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Edge(org.kie.workbench.common.stunner.core.graph.Edge) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) GatewayExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.gateway.GatewayExecutionSet)

Example 3 with GatewayExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.gateway.GatewayExecutionSet in project kie-wb-common by kiegroup.

the class GatewayConverter method exclusiveGateway.

private BpmnNode exclusiveGateway(Gateway gateway) {
    Node<View<ExclusiveGateway>, Edge> node = factoryManager.newNode(gateway.getId(), ExclusiveGateway.class);
    ExclusiveGateway definition = node.getContent().getDefinition();
    GatewayPropertyReader p = propertyReaderFactory.of(gateway);
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setExecutionSet(new GatewayExecutionSet(new DefaultRoute(p.getDefaultRoute())));
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    return BpmnNode.of(node);
}
Also used : ExclusiveGateway(org.kie.workbench.common.stunner.bpmn.definition.ExclusiveGateway) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) DefaultRoute(org.kie.workbench.common.stunner.bpmn.definition.property.gateway.DefaultRoute) GatewayPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.GatewayPropertyReader) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Edge(org.kie.workbench.common.stunner.core.graph.Edge) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) GatewayExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.gateway.GatewayExecutionSet)

Example 4 with GatewayExecutionSet

use of org.kie.workbench.common.stunner.bpmn.definition.property.gateway.GatewayExecutionSet 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)

Aggregations

GatewayExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.gateway.GatewayExecutionSet)4 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)4 Factories.bpmn2 (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2)2 GatewayPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.GatewayPropertyWriter)2 GatewayPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.GatewayPropertyReader)2 ExclusiveGateway (org.kie.workbench.common.stunner.bpmn.definition.ExclusiveGateway)2 InclusiveGateway (org.kie.workbench.common.stunner.bpmn.definition.InclusiveGateway)2 DefaultRoute (org.kie.workbench.common.stunner.bpmn.definition.property.gateway.DefaultRoute)2 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)2 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)2 Edge (org.kie.workbench.common.stunner.core.graph.Edge)2 View (org.kie.workbench.common.stunner.core.graph.content.view.View)2