Search in sources :

Example 1 with ParallelGateway

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

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

the class ContextUtilsTest method testIsFormGenerationSupported.

@Test
public void testIsFormGenerationSupported() {
    Assert.assertTrue(ContextUtils.isFormGenerationSupported(createNode(new UserTask())));
    Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new ScriptTask())));
    Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new BusinessRuleTask())));
    Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new NoneTask())));
    Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new StartNoneEvent())));
    Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new EndNoneEvent())));
    Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new ParallelGateway())));
}
Also used : ScriptTask(org.kie.workbench.common.stunner.bpmn.definition.ScriptTask) NoneTask(org.kie.workbench.common.stunner.bpmn.definition.NoneTask) ParallelGateway(org.kie.workbench.common.stunner.bpmn.definition.ParallelGateway) UserTask(org.kie.workbench.common.stunner.bpmn.definition.UserTask) BusinessRuleTask(org.kie.workbench.common.stunner.bpmn.definition.BusinessRuleTask) EndNoneEvent(org.kie.workbench.common.stunner.bpmn.definition.EndNoneEvent) StartNoneEvent(org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent) Test(org.junit.Test)

Example 3 with ParallelGateway

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

ParallelGateway (org.kie.workbench.common.stunner.bpmn.definition.ParallelGateway)3 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)2 Test (org.junit.Test)1 Factories.bpmn2 (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2)1 GatewayPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.GatewayPropertyWriter)1 GatewayPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.GatewayPropertyReader)1 BusinessRuleTask (org.kie.workbench.common.stunner.bpmn.definition.BusinessRuleTask)1 EndNoneEvent (org.kie.workbench.common.stunner.bpmn.definition.EndNoneEvent)1 NoneTask (org.kie.workbench.common.stunner.bpmn.definition.NoneTask)1 ScriptTask (org.kie.workbench.common.stunner.bpmn.definition.ScriptTask)1 StartNoneEvent (org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent)1 UserTask (org.kie.workbench.common.stunner.bpmn.definition.UserTask)1 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)1 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)1 Edge (org.kie.workbench.common.stunner.core.graph.Edge)1 View (org.kie.workbench.common.stunner.core.graph.content.view.View)1