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);
}
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())));
}
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;
}
Aggregations