Search in sources :

Example 21 with IntermediateSignalEventCatching

use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching in project kie-wb-common by kiegroup.

the class CatchingIntermediateSignalEventTest method testUnmarshallSubprocessLevelEventWithEdgesFilledProperties.

@Test
@Override
public void testUnmarshallSubprocessLevelEventWithEdgesFilledProperties() {
    final String EVENT_NAME = "signal name ~`!@#$%^&*()_+=-{}|\\][:\";'?><,./";
    final String EVENT_DOCUMENTATION = "signal documentation\n ~`!@#$%^&*()_+=-{}|\\][:\";'?><,./";
    final String EVENT_REF = "signal4";
    final String EVENT_DATA_OUTPUT = "||signal04:String||[dout]signal04->processGlobalVar";
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateSignalEventCatching filledSubprocessEvent = getCatchingIntermediateNodeById(diagram, FILLED_WITH_EDGES_SUBPROCESS_LEVEL_EVENT_ID, HAS_INCOME_EDGE, TWO_OUTGOING_EDGES);
    assertGeneralSet(filledSubprocessEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
    assertSignalEventExecutionSet(filledSubprocessEvent.getExecutionSet(), EVENT_REF, CANCELLING, SLA_DUE_DATE);
    assertDataIOSet(filledSubprocessEvent.getDataIOSet(), EVENT_DATA_OUTPUT);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) IntermediateSignalEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Example 22 with IntermediateSignalEventCatching

use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching in project kie-wb-common by kiegroup.

the class BoundaryCatchingIntermediateSignalEventTest method testUnmarshallSubprocessLevelEventFilledProperties.

@Test
@Override
public void testUnmarshallSubprocessLevelEventFilledProperties() throws Exception {
    final String EVENT_NAME = "Boundary signal03 ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
    final String EVENT_DOCUMENTATION = "signal03 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
    final String EVENT_REF = "signal03";
    final String EVENT_DATA_OUTPUT = "||signal03:String||[dout]signal03->processGlobalVar";
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateSignalEventCatching filledSubprocessEvent = getCatchingIntermediateNodeById(diagram, FILLED_SUBPROCESS_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, ZERO_OUTGOING_EDGES);
    assertGeneralSet(filledSubprocessEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
    assertSignalEventExecutionSet(filledSubprocessEvent.getExecutionSet(), EVENT_REF, CANCELLING, SLA_DUE_DATE);
    assertDataIOSet(filledSubprocessEvent.getDataIOSet(), EVENT_DATA_OUTPUT);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) IntermediateSignalEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Example 23 with IntermediateSignalEventCatching

use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching in project kie-wb-common by kiegroup.

the class BoundaryCatchingIntermediateSignalEventTest method testUnmarshallTopLevelEventFilledProperties.

@Test
@Override
public void testUnmarshallTopLevelEventFilledProperties() throws Exception {
    final String EVENT_NAME = "Boundary signal01 ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
    final String EVENT_DOCUMENTATION = "signal01 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
    final String EVENT_REF = "signal01";
    final String EVENT_DATA_OUTPUT = "||signal01:String||[dout]signal01->processGlobalVar";
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateSignalEventCatching filledTopEvent = getCatchingIntermediateNodeById(diagram, FILLED_TOP_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, ZERO_OUTGOING_EDGES);
    assertGeneralSet(filledTopEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
    assertSignalEventExecutionSet(filledTopEvent.getExecutionSet(), EVENT_REF, CANCELLING, SLA_DUE_DATE);
    assertDataIOSet(filledTopEvent.getDataIOSet(), EVENT_DATA_OUTPUT);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) IntermediateSignalEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Example 24 with IntermediateSignalEventCatching

use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching in project kie-wb-common by kiegroup.

the class BoundaryCatchingIntermediateSignalEventTest method testUnmarshallSubprocessLevelEventWithEdgesEmptyProperties.

@Test
@Override
public void testUnmarshallSubprocessLevelEventWithEdgesEmptyProperties() {
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateSignalEventCatching emptySubprocessEvent = getCatchingIntermediateNodeById(diagram, EMPTY_WITH_EDGES_SUBPROCESS_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, TWO_OUTGOING_EDGES);
    assertGeneralSet(emptySubprocessEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
    assertSignalEventExecutionSet(emptySubprocessEvent.getExecutionSet(), EMPTY_VALUE, NON_CANCELLING, EMPTY_VALUE);
    assertDataIOSet(emptySubprocessEvent.getDataIOSet(), EMPTY_VALUE);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) IntermediateSignalEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Example 25 with IntermediateSignalEventCatching

use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching in project kie-wb-common by kiegroup.

the class IntermediateCatchEventConverterTest method signalEvent.

@Test
public void signalEvent() {
    IntermediateSignalEventCatching definition = mock(IntermediateSignalEventCatching.class);
    SignalEventDefinition eventDefinition = mock(SignalEventDefinition.class);
    CatchEvent catchEvent = mockIntermediateCatchEvent(definition);
    tested.signalEvent(catchEvent);
    verifyCommonProperties(definition);
    verify(propertyReader).isCancelActivity();
    verify(propertyReader).getSlaDueDate();
    verify(propertyReader).getSignalRef();
    verify(definition).setExecutionSet(Mockito.<CancellingSignalEventExecutionSet>any());
}
Also used : IntermediateSignalEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching) SignalEventDefinition(org.eclipse.bpmn2.SignalEventDefinition) CatchEvent(org.eclipse.bpmn2.CatchEvent) IntermediateCatchEvent(org.eclipse.bpmn2.IntermediateCatchEvent) Test(org.junit.Test)

Aggregations

IntermediateSignalEventCatching (org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching)33 Test (org.junit.Test)24 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)18 Graph (org.kie.workbench.common.stunner.core.graph.Graph)18 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)5 CancellingSignalEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.CancellingSignalEventExecutionSet)5 CancelActivity (org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)4 SignalEventDefinition (org.eclipse.bpmn2.SignalEventDefinition)3 IntermediateMessageEventCatching (org.kie.workbench.common.stunner.bpmn.definition.IntermediateMessageEventCatching)3 AssignmentsInfo (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)3 SignalRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalRef)3 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)3 IntermediateCatchEvent (org.eclipse.bpmn2.IntermediateCatchEvent)2 CatchEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader)2 BaseCatchingIntermediateEvent (org.kie.workbench.common.stunner.bpmn.definition.BaseCatchingIntermediateEvent)2 IntermediateConditionalEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent)2 IntermediateErrorEventCatching (org.kie.workbench.common.stunner.bpmn.definition.IntermediateErrorEventCatching)2 IntermediateTimerEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateTimerEvent)2 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)2 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)2