use of org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest method testUnmarshallStartMessageEvent.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallStartMessageEvent() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_STARTMESSAGEEVENT);
assertDiagram(diagram, 2);
assertEquals("StartMessageEvent", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> startMessageEventNode = diagram.getGraph().getNode("_34C4BBFC-544F-4E23-B17B-547BB48EEB63");
StartMessageEvent startMessageEvent = (StartMessageEvent) startMessageEventNode.getContent().getDefinition();
assertNotNull(startMessageEvent.getExecutionSet());
MessageRef messageRef = startMessageEvent.getExecutionSet().getMessageRef();
IsInterrupting isInterrupting = startMessageEvent.getExecutionSet().getIsInterrupting();
assertEquals("msgref", messageRef.getValue());
assertEquals(true, isInterrupting.getValue());
assertEquals("12/25/1983", startMessageEvent.getExecutionSet().getSlaDueDate().getValue());
DataIOSet dataIOSet = startMessageEvent.getDataIOSet();
AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
assertEquals("||StartMessageEventOutputVar1:String||[dout]StartMessageEventOutputVar1->var1", assignmentsInfo.getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest method testUnmarshallStartTimerEvent.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallStartTimerEvent() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_STARTTIMEREVENT);
assertDiagram(diagram, 4);
assertEquals("StartTimerEvent", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> startTimerEventNode = diagram.getGraph().getNode("_49ADC988-B63D-4AEB-B811-67969F305FD0");
StartTimerEvent startTimerEvent = (StartTimerEvent) startTimerEventNode.getContent().getDefinition();
IsInterrupting isInterrupting = startTimerEvent.getExecutionSet().getIsInterrupting();
assertEquals(false, isInterrupting.getValue());
assertEquals("12/25/1983", startTimerEvent.getExecutionSet().getSlaDueDate().getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting in project kie-wb-common by kiegroup.
the class StartEventConverter method signalEvent.
private BpmnNode signalEvent(StartEvent event, SignalEventDefinition e) {
Node<View<StartSignalEvent>, Edge> node = factoryManager.newNode(event.getId(), StartSignalEvent.class);
StartSignalEvent definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setBackgroundSet(p.getBackgroundSet());
definition.setFontSet(p.getFontSet());
definition.setDimensionsSet(p.getCircleDimensionSet());
definition.setSimulationSet(p.getSimulationSet());
definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
IsInterrupting isInterrupting = new IsInterrupting(event.isIsInterrupting());
SLADueDate slaDueDate = new SLADueDate(p.getSlaDueDate());
SignalRef signalRef = new SignalRef(p.getSignalRef());
InterruptingSignalEventExecutionSet executionSet = new InterruptingSignalEventExecutionSet(isInterrupting, slaDueDate, signalRef);
definition.setExecutionSet(executionSet);
node.getContent().setBounds(p.getBounds());
return BpmnNode.of(node, p);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting in project kie-wb-common by kiegroup.
the class StartEventConverter method errorEvent.
private BpmnNode errorEvent(StartEvent event, ErrorEventDefinition e) {
Node<View<StartErrorEvent>, Edge> node = factoryManager.newNode(event.getId(), StartErrorEvent.class);
StartErrorEvent definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setBackgroundSet(p.getBackgroundSet());
definition.setFontSet(p.getFontSet());
definition.setDimensionsSet(p.getCircleDimensionSet());
definition.setSimulationSet(p.getSimulationSet());
definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
IsInterrupting isInterrupting = new IsInterrupting(event.isIsInterrupting());
SLADueDate slaDueDate = new SLADueDate(p.getSlaDueDate());
ErrorRef errorRef = new ErrorRef(EventDefinitionReader.errorRefOf(e));
InterruptingErrorEventExecutionSet executionSet = new InterruptingErrorEventExecutionSet(isInterrupting, slaDueDate, errorRef);
definition.setExecutionSet(executionSet);
node.getContent().setBounds(p.getBounds());
return BpmnNode.of(node, p);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting in project kie-wb-common by kiegroup.
the class StartEventConverter method timerEvent.
private BpmnNode timerEvent(StartEvent event, TimerEventDefinition e) {
Node<View<StartTimerEvent>, Edge> node = factoryManager.newNode(event.getId(), StartTimerEvent.class);
StartTimerEvent definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setBackgroundSet(p.getBackgroundSet());
definition.setFontSet(p.getFontSet());
definition.setDimensionsSet(p.getCircleDimensionSet());
definition.setSimulationSet(p.getSimulationSet());
definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
IsInterrupting isInterrupting = new IsInterrupting(event.isIsInterrupting());
SLADueDate slaDueDate = new SLADueDate(p.getSlaDueDate());
TimerSettings timerSettings = new TimerSettings(p.getTimerSettings(e));
InterruptingTimerEventExecutionSet executionSet = new InterruptingTimerEventExecutionSet(isInterrupting, slaDueDate, timerSettings);
definition.setExecutionSet(executionSet);
node.getContent().setBounds(p.getBounds());
return BpmnNode.of(node, p);
}
Aggregations