use of org.kie.workbench.common.stunner.bpmn.definition.EndTerminateEvent in project kie-wb-common by kiegroup.
the class EndEventConverter method terminateEndEvent.
private BpmnNode terminateEndEvent(EndEvent event, TerminateEventDefinition e) {
Node<View<EndTerminateEvent>, Edge> node = factoryManager.newNode(event.getId(), EndTerminateEvent.class);
EndTerminateEvent definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
node.getContent().setBounds(p.getBounds());
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.EndTerminateEvent in project kie-wb-common by kiegroup.
the class EndEventConverter method terminateEvent.
private PropertyWriter terminateEvent(Node<View<EndTerminateEvent>, ?> n) {
EndEvent event = bpmn2.createEndEvent();
event.setId(n.getUUID());
EndTerminateEvent definition = n.getContent().getDefinition();
ThrowEventPropertyWriter p = propertyWriterFactory.of(event);
BPMNGeneralSet general = definition.getGeneral();
p.setName(general.getName().getValue());
p.setDocumentation(general.getDocumentation().getValue());
p.addTerminate();
p.setBounds(n.getContent().getBounds());
return p;
}
use of org.kie.workbench.common.stunner.bpmn.definition.EndTerminateEvent in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest method testUnmarshallEndTerminateEvent.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallEndTerminateEvent() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_ENDTERMINATEEVENT);
assertDiagram(diagram, 3);
assertEquals("endTerminateEvent", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> endNoneEventNode = diagram.getGraph().getNode("_1B379E3E-E4ED-4BD2-AEE8-CD85374CEC78");
EndTerminateEvent endTerminateEvent = (EndTerminateEvent) endNoneEventNode.getContent().getDefinition();
assertNotNull(endTerminateEvent.getGeneral());
assertEquals("MyEndTerminateEvent", endTerminateEvent.getGeneral().getName().getValue());
assertEquals("MyEndTerminateEventDocumentation", endTerminateEvent.getGeneral().getDocumentation().getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.EndTerminateEvent in project kie-wb-common by kiegroup.
the class BPMNDiagramMarshallerTest method testUnmarshallEndTerminateEvent.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallEndTerminateEvent() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_ENDTERMINATEEVENT);
assertDiagram(diagram, 3);
assertEquals("endTerminateEvent", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> endNoneEventNode = diagram.getGraph().getNode("_1B379E3E-E4ED-4BD2-AEE8-CD85374CEC78");
EndTerminateEvent endTerminateEvent = (EndTerminateEvent) endNoneEventNode.getContent().getDefinition();
assertNotNull(endTerminateEvent.getGeneral());
assertEquals("MyEndTerminateEvent", endTerminateEvent.getGeneral().getName().getValue());
assertEquals("MyEndTerminateEventDocumentation", endTerminateEvent.getGeneral().getDocumentation().getValue());
}
Aggregations