use of org.kie.workbench.common.stunner.bpmn.definition.StartSignalEvent 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.StartSignalEvent in project kie-wb-common by kiegroup.
the class EventInterruptingViewHandlerTest method testHandleSignalEventIsNotInterrupting.
@Test
@SuppressWarnings("unchecked")
public void testHandleSignalEventIsNotInterrupting() {
final StartSignalEvent bean = new StartSignalEvent.StartSignalEventBuilder().build();
bean.getExecutionSet().getIsInterrupting().setValue(false);
tested.handle(bean, view);
verify(prim1).setAlpha(eq(0d));
verify(prim2).setAlpha(eq(1d));
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartSignalEvent 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.StartSignalEvent in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest method testUnmarshallStartSignalEvent.
@Test
@SuppressWarnings("unchecked")
public void testUnmarshallStartSignalEvent() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(BPMN_STARTSIGNALEVENT);
assertDiagram(diagram, 4);
assertEquals("StartSignalEvent", diagram.getMetadata().getTitle());
Node<? extends Definition, ?> startSignalEventNode = diagram.getGraph().getNode("_1876844A-4DAC-4214-8BCD-2ABA3FCC8EB5");
StartSignalEvent startSignalEvent = (StartSignalEvent) startSignalEventNode.getContent().getDefinition();
assertNotNull(startSignalEvent.getExecutionSet());
SignalRef signalRef = startSignalEvent.getExecutionSet().getSignalRef();
assertEquals("sig1", signalRef.getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartSignalEvent in project kie-wb-common by kiegroup.
the class StartSignalEventTest method testUnmarshallTopLevelEventFilledProperties.
@Test
@Override
public void testUnmarshallTopLevelEventFilledProperties() throws Exception {
final String EVENT_NAME = "Signal Start Event with Name";
final String EVENT_DOCUMENTATION = "Non empty\nDocumentation\n~`!@#$%^&*()_+=-{}|\\][:\";'?><,./";
final String SIGNAL_REF = "Signal1";
final String EVENT_DATA_OUTPUT = "||event:String||[dout]event->processVar";
Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_START_EVENT_FILE_PATH);
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartSignalEvent filledTop = getStartNodeById(diagram, FILLED_TOP_LEVEL_EVENT_ID, StartSignalEvent.class);
assertGeneralSet(filledTop.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
assertSignalEventExecutionSet(filledTop.getExecutionSet(), SIGNAL_REF, INTERRUPTING);
assertDataIOSet(filledTop.getDataIOSet(), EVENT_DATA_OUTPUT);
}
Aggregations