Search in sources :

Example 16 with IntermediateConditionalEvent

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

the class CatchingIntermediateConditionalEventTest method testUnmarshallTopLevelEventWithEdgesFilledProperties.

@Test
@Override
public void testUnmarshallTopLevelEventWithEdgesFilledProperties() {
    final String EVENT_NAME = "Event02 ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
    final String EVENT_DOCUMENTATION = "Event 02 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
    final String CONDITION_EXPRESSION_SCRIPT = "com.myspace.testproject.Person(name == \"John\")";
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateConditionalEvent filledSubprocessEvent = getCatchingIntermediateNodeById(diagram, FILLED_WITH_EDGES_TOP_LEVEL_EVENT_ID, HAS_INCOME_EDGE, TWO_OUTGOING_EDGES);
    assertGeneralSet(filledSubprocessEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
    assertConditionalEventExecutionSet(filledSubprocessEvent.getExecutionSet(), CONDITION_EXPRESSION_SCRIPT, CONDITION_EXPRESSION_LANGUAGE, CONDITION_EXPRESSION_TYPE, CANCELLING, SLA_DUE_DATE);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) IntermediateConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Example 17 with IntermediateConditionalEvent

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

the class BoundaryCatchingIntermediateConditionalEventTest method testUnmarshallSubprocessLevelEventEmptyProperties.

@Test
@Override
public void testUnmarshallSubprocessLevelEventEmptyProperties() throws Exception {
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateConditionalEvent emptySubprocessEvent = getCatchingIntermediateNodeById(diagram, EMPTY_SUBPROCESS_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, ZERO_OUTGOING_EDGES);
    assertGeneralSet(emptySubprocessEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
    assertConditionalEventExecutionSet(emptySubprocessEvent.getExecutionSet(), CONDITION_EXPRESSION_SCRIPT_DEFAULT_VALUE, CONDITION_EXPRESSION_LANGUAGE, CONDITION_ERPRESSION_TYPE, NON_CANCELLING, EMPTY_VALUE);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) IntermediateConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Example 18 with IntermediateConditionalEvent

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

the class BoundaryCatchingIntermediateConditionalEventTest method testUnmarshallSubprocessLevelEventWithEdgesFilledProperties.

@Test
@Override
public void testUnmarshallSubprocessLevelEventWithEdgesFilledProperties() {
    final String EVENT_NAME = "Boundary04 ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
    final String EVENT_DOCUMENTATION = "Boundary 04 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
    final String CONDITION_EXPRESSION_SCRIPT = "com.myspace.testproject.Person(name == \"John\")";
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateConditionalEvent filledSubprocessEvent = getCatchingIntermediateNodeById(diagram, FILLED_WITH_EDGES_SUBPROCESS_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, TWO_OUTGOING_EDGES);
    assertGeneralSet(filledSubprocessEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
    assertConditionalEventExecutionSet(filledSubprocessEvent.getExecutionSet(), CONDITION_EXPRESSION_SCRIPT, CONDITION_EXPRESSION_LANGUAGE, CONDITION_ERPRESSION_TYPE, CANCELLING, SLA_DUE_DATE);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) IntermediateConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Example 19 with IntermediateConditionalEvent

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

the class BoundaryCatchingIntermediateConditionalEventTest method testUnmarshallTopLevelEventWithEdgesFilledProperties.

@Test
@Override
public void testUnmarshallTopLevelEventWithEdgesFilledProperties() {
    final String EVENT_NAME = "Boundary02 ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
    final String EVENT_DOCUMENTATION = "Boundary 02 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
    final String CONDITION_EXPRESSION_SCRIPT = "com.myspace.testproject.Person(name == \"John\")";
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateConditionalEvent filledSubprocessEvent = getCatchingIntermediateNodeById(diagram, FILLED_WITH_EDGES_TOP_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, TWO_OUTGOING_EDGES);
    assertGeneralSet(filledSubprocessEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
    assertConditionalEventExecutionSet(filledSubprocessEvent.getExecutionSet(), CONDITION_EXPRESSION_SCRIPT, CONDITION_EXPRESSION_LANGUAGE, CONDITION_ERPRESSION_TYPE, CANCELLING, SLA_DUE_DATE);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) IntermediateConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Example 20 with IntermediateConditionalEvent

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

the class CatchingIntermediateConditionalEventTest method testUnmarshallTopLevelEventWithEdgesEmptyProperties.

@Test
@Override
public void testUnmarshallTopLevelEventWithEdgesEmptyProperties() {
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateConditionalEvent emptyEvent = getCatchingIntermediateNodeById(diagram, EMPTY_WITH_EDGES_TOP_LEVEL_EVENT_ID, HAS_INCOME_EDGE, TWO_OUTGOING_EDGES);
    assertGeneralSet(emptyEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
    assertConditionalEventExecutionSet(emptyEvent.getExecutionSet(), CONDITION_EXPRESSION_SCRIPT_DEFAULT_VALUE, CONDITION_EXPRESSION_LANGUAGE, CONDITION_EXPRESSION_TYPE, CANCELLING, EMPTY_VALUE);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) IntermediateConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Aggregations

IntermediateConditionalEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent)30 Test (org.junit.Test)25 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)17 Graph (org.kie.workbench.common.stunner.core.graph.Graph)17 ConditionalEventDefinition (org.eclipse.bpmn2.ConditionalEventDefinition)3 EndNoneEvent (org.kie.workbench.common.stunner.bpmn.definition.EndNoneEvent)3 StartNoneEvent (org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent)3 CancellingConditionalEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.conditional.CancellingConditionalEventExecutionSet)3 TestingGraphInstanceBuilder2 (org.kie.workbench.common.stunner.core.TestingGraphInstanceBuilder2)3 IntermediateCatchEvent (org.eclipse.bpmn2.IntermediateCatchEvent)2 BaseCatchingIntermediateEvent (org.kie.workbench.common.stunner.bpmn.definition.BaseCatchingIntermediateEvent)2 IntermediateCompensationEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEvent)2 IntermediateMessageEventCatching (org.kie.workbench.common.stunner.bpmn.definition.IntermediateMessageEventCatching)2 IntermediateSignalEventCatching (org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching)2 IntermediateTimerEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateTimerEvent)2 CancelActivity (org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)2 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)2 BoundaryEvent (org.eclipse.bpmn2.BoundaryEvent)1 CatchEvent (org.eclipse.bpmn2.CatchEvent)1 CatchEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter)1