use of org.kie.workbench.common.stunner.bpmn.definition.StartSignalEvent in project kie-wb-common by kiegroup.
the class StartSignalEventTest method testUnmarshallSubprocessLevelEventEmptyProperties.
@Test
@Override
public void testUnmarshallSubprocessLevelEventEmptyProperties() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_START_EVENT_FILE_PATH);
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartSignalEvent emptySubprocess = getStartNodeById(diagram, EMPTY_SUBPROCESS_LEVEL_EVENT_ID, StartSignalEvent.class);
assertGeneralSet(emptySubprocess.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
assertSignalEventExecutionSet(emptySubprocess.getExecutionSet(), EMPTY_VALUE, NON_INTERRUPTING);
assertDataIOSet(emptySubprocess.getDataIOSet(), EMPTY_VALUE);
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartSignalEvent in project kie-wb-common by kiegroup.
the class StartSignalEventTest method testUnmarshallTopLevelEmptyEventProperties.
@Test
@Override
public void testUnmarshallTopLevelEmptyEventProperties() throws Exception {
Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_START_EVENT_FILE_PATH);
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartSignalEvent emptyTop = getStartNodeById(diagram, EMPTY_TOP_LEVEL_EVENT_ID, StartSignalEvent.class);
assertGeneralSet(emptyTop.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
assertSignalEventExecutionSet(emptyTop.getExecutionSet(), EMPTY_VALUE, NON_INTERRUPTING);
assertDataIOSet(emptyTop.getDataIOSet(), EMPTY_VALUE);
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartSignalEvent in project kie-wb-common by kiegroup.
the class StartSignalEventTest method testUnmarshallSubprocessLevelEventFilledProperties.
@Test
@Override
public void testUnmarshallSubprocessLevelEventFilledProperties() throws Exception {
final String EVENT_NAME = "Signal inside of Event sub-process";
final String EVENT_DOCUMENTATION = "Non empty Signal Event\nDocumentation\n~`!@#$%^&*()_+=-{}|\\][:\";'?><,./";
final String SIGNAL_REF = "AnotherSignal";
final String EVENT_DATA_OUTPUT = "||hello:String||[dout]hello->processVar";
Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_START_EVENT_FILE_PATH);
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
StartSignalEvent filledSubprocess = getStartNodeById(diagram, FILLED_SUBPROCESS_LEVEL_EVENT_ID, StartSignalEvent.class);
assertGeneralSet(filledSubprocess.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
assertSignalEventExecutionSet(filledSubprocess.getExecutionSet(), SIGNAL_REF, INTERRUPTING);
assertDataIOSet(filledSubprocess.getDataIOSet(), EVENT_DATA_OUTPUT);
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartSignalEvent in project kie-wb-common by kiegroup.
the class EventInterruptingViewHandlerTest method testHandleSignalEventIsInterrupting.
@Test
@SuppressWarnings("unchecked")
public void testHandleSignalEventIsInterrupting() {
final StartSignalEvent bean = new StartSignalEvent.StartSignalEventBuilder().build();
bean.getExecutionSet().getIsInterrupting().setValue(true);
tested.handle(bean, view);
verify(prim1).setAlpha(eq(1d));
verify(prim2).setAlpha(eq(0d));
}
use of org.kie.workbench.common.stunner.bpmn.definition.StartSignalEvent in project kie-wb-common by kiegroup.
the class BPMNDiagramMarshallerTest 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());
}
Aggregations