use of org.kie.workbench.common.stunner.bpmn.definition.property.event.timer.CancellingTimerEventExecutionSet in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverter method timerEvent.
private BpmnNode timerEvent(CatchEvent event, TimerEventDefinition e) {
String nodeId = event.getId();
Node<View<IntermediateTimerEvent>, Edge> node = factoryManager.newNode(nodeId, IntermediateTimerEvent.class);
IntermediateTimerEvent definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setExecutionSet(new CancellingTimerEventExecutionSet(new CancelActivity(p.isCancelActivity()), new TimerSettings(p.getTimerSettings(e))));
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.property.event.timer.CancellingTimerEventExecutionSet in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest method testUnmarshallEventDefinitionRef.
@Test
public void testUnmarshallEventDefinitionRef() {
try {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_EVENT_DEFINITION_REF);
Node<? extends Definition<IntermediateTimerEvent>, ?> intermediateTimerEvent = diagram.getGraph().getNode("FLOWNODE_9e71d692-986c-11e7-40d3-005056844bde");
IntermediateTimerEvent definition = intermediateTimerEvent.getContent().getDefinition();
CancellingTimerEventExecutionSet executionSet = definition.getExecutionSet();
TimerSettings timerSettings = executionSet.getTimerSettings();
} catch (Exception ex) {
fail(ex.getMessage());
}
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.timer.CancellingTimerEventExecutionSet in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverter method timerEvent.
private PropertyWriter timerEvent(Node<View<IntermediateTimerEvent>, ?> n) {
CatchEventPropertyWriter p = createCatchEventPropertyWriter(n);
p.getFlowElement().setId(n.getUUID());
IntermediateTimerEvent definition = n.getContent().getDefinition();
BPMNGeneralSet general = definition.getGeneral();
p.setName(general.getName().getValue());
p.setDocumentation(general.getDocumentation().getValue());
CancellingTimerEventExecutionSet executionSet = definition.getExecutionSet();
p.addTimer(executionSet.getTimerSettings());
p.setBounds(n.getContent().getBounds());
return p;
}
Aggregations