Search in sources :

Example 1 with GatewayPropertyReader

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

the class GatewayConverter method parallelGateway.

private BpmnNode parallelGateway(Gateway gateway) {
    Node<View<ParallelGateway>, Edge> node = factoryManager.newNode(gateway.getId(), ParallelGateway.class);
    GatewayPropertyReader p = propertyReaderFactory.of(gateway);
    node.getContent().setBounds(p.getBounds());
    ParallelGateway definition = node.getContent().getDefinition();
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    return BpmnNode.of(node);
}
Also used : ParallelGateway(org.kie.workbench.common.stunner.bpmn.definition.ParallelGateway) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) 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)

Example 2 with GatewayPropertyReader

use of org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.GatewayPropertyReader 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 GatewayPropertyReader

use of org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.GatewayPropertyReader 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)

Aggregations

GatewayPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.GatewayPropertyReader)3 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)3 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)3 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)3 Edge (org.kie.workbench.common.stunner.core.graph.Edge)3 View (org.kie.workbench.common.stunner.core.graph.content.view.View)3 DefaultRoute (org.kie.workbench.common.stunner.bpmn.definition.property.gateway.DefaultRoute)2 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