use of org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.InterruptingSignalEventExecutionSet 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.setExecutionSet(new InterruptingSignalEventExecutionSet(new IsInterrupting(event.isIsInterrupting()), new SignalRef(p.getSignalRef())));
definition.setSimulationSet(p.getSimulationSet());
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.signal.InterruptingSignalEventExecutionSet in project kie-wb-common by kiegroup.
the class ProcessSignalRefProviderTest method mockStartSignalEventNode.
private Node mockStartSignalEventNode(String signalRefValue) {
StartSignalEvent event = new StartSignalEvent();
event.setExecutionSet(new InterruptingSignalEventExecutionSet(new IsInterrupting(true), new SignalRef(signalRefValue)));
return mockNode(event);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.InterruptingSignalEventExecutionSet in project kie-wb-common by kiegroup.
the class BPMNDiagramMarshallerTest method testUnmarshallIsInterruptingStartSignalEvent.
@Test
public void testUnmarshallIsInterruptingStartSignalEvent() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_EVENT_SUBPROCESS_STARTSIGNALEVENT);
assertDiagram(diagram, 7);
assertEquals("EventSubprocessStartSignalEvent", diagram.getMetadata().getTitle());
// Check first start event with all FILLED properties
Node<? extends Definition, ?> startEventNode = diagram.getGraph().getNode("_B6B3A062-F04A-4E45-A08B-C1F0971C3DF9");
StartSignalEvent startSignalEvent = (StartSignalEvent) startEventNode.getContent().getDefinition();
BPMNGeneralSet eventGeneralSet = startSignalEvent.getGeneral();
assertNotNull(eventGeneralSet);
assertEquals("StartSignalEvent", eventGeneralSet.getName().getValue());
assertEquals("Some not empty\nDocumentation\n~`!@#$%^&*()_+=-{}|[]\\:\";'<>/?.,", eventGeneralSet.getDocumentation().getValue());
InterruptingSignalEventExecutionSet eventExecutionSet = startSignalEvent.getExecutionSet();
assertNotNull(eventExecutionSet);
assertNotNull(eventExecutionSet.getSignalRef());
assertEquals("Signal1", eventExecutionSet.getSignalRef().getValue());
assertEquals(true, eventExecutionSet.getIsInterrupting().getValue());
DataIOSet eventDataIOSet = startSignalEvent.getDataIOSet();
AssignmentsInfo assignmentsInfo = eventDataIOSet.getAssignmentsinfo();
assertEquals("||Var1:String||[dout]Var1->Var1", assignmentsInfo.getValue());
// Check second start event with all EMPTY properties
Node<? extends Definition, ?> emptyEventNode = diagram.getGraph().getNode("_A8B9513C-D237-4BDA-B7BC-7C79F7D12BB5");
StartSignalEvent emptySignalEvent = (StartSignalEvent) emptyEventNode.getContent().getDefinition();
BPMNGeneralSet emptyEventGeneralSet = emptySignalEvent.getGeneral();
assertNotNull(emptyEventGeneralSet);
assertEquals("", emptyEventGeneralSet.getName().getValue());
assertEquals("", emptyEventGeneralSet.getDocumentation().getValue());
InterruptingSignalEventExecutionSet emptyExecutionSet = emptySignalEvent.getExecutionSet();
assertNotNull(emptyExecutionSet);
assertNotNull(emptyExecutionSet.getSignalRef());
assertEquals("", emptyExecutionSet.getSignalRef().getValue());
assertEquals(false, emptyExecutionSet.getIsInterrupting().getValue());
DataIOSet emptyDataIOSet = emptySignalEvent.getDataIOSet();
AssignmentsInfo emptyAssignmentsInfo = emptyDataIOSet.getAssignmentsinfo();
assertEquals("", emptyAssignmentsInfo.getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.InterruptingSignalEventExecutionSet in project kie-wb-common by kiegroup.
the class StartEventConverter method signalEvent.
private PropertyWriter signalEvent(Node<View<StartSignalEvent>, ?> n) {
StartEvent event = bpmn2.createStartEvent();
event.setId(n.getUUID());
StartSignalEvent definition = n.getContent().getDefinition();
CatchEventPropertyWriter p = propertyWriterFactory.of(event);
BPMNGeneralSet general = definition.getGeneral();
p.setName(general.getName().getValue());
p.setDocumentation(general.getName().getValue());
p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
InterruptingSignalEventExecutionSet executionSet = definition.getExecutionSet();
p.addSignal(executionSet.getSignalRef());
p.setBounds(n.getContent().getBounds());
return p;
}
Aggregations