Search in sources :

Example 11 with IntermediateCompensationEventThrowing

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

the class ThrowingIntermediateCompensationEventTest method testUnmarshallSubprocessLevelEventEmptyProperties.

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

Example 12 with IntermediateCompensationEventThrowing

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

the class ThrowingIntermediateCompensationEventTest method testUnmarshallSubprocessLevelEventWithEdgesFilledProperties.

@Test
@Override
public void testUnmarshallSubprocessLevelEventWithEdgesFilledProperties() {
    final String EVENT_NAME = "Compensation event04 name\n ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
    final String EVENT_DOCUMENTATION = "Compensation event04 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
    final String ACTIVITY_REFERENCE = "_4305E23D-496B-42AA-AEE0-2840B4E75F15";
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateCompensationEventThrowing filledSubprocessEvent = getThrowingIntermediateNodeById(diagram, FILLED_WITH_EDGES_SUBPROCESS_LEVEL_EVENT_ID, HAS_INCOME_EDGE, TWO_OUTGOING_EDGES);
    assertGeneralSet(filledSubprocessEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
    assertCompensationEventExecutionSet(filledSubprocessEvent.getExecutionSet(), ACTIVITY_REFERENCE);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) IntermediateCompensationEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEventThrowing) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Example 13 with IntermediateCompensationEventThrowing

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

the class ThrowingIntermediateCompensationEventTest method testUnmarshallTopLevelEventFilledProperties.

@Test
@Override
public void testUnmarshallTopLevelEventFilledProperties() throws Exception {
    final String EVENT_NAME = "Compensation event01 name\n ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
    final String EVENT_DOCUMENTATION = "Compensation event01 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
    final String ACTIVITY_REFERENCE = "_1FDF93CC-5677-48C2-9760-B7B98FA08DD6";
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateCompensationEventThrowing filledTopEvent = getThrowingIntermediateNodeById(diagram, FILLED_TOP_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, ZERO_OUTGOING_EDGES);
    assertGeneralSet(filledTopEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
    assertCompensationEventExecutionSet(filledTopEvent.getExecutionSet(), ACTIVITY_REFERENCE);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) IntermediateCompensationEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEventThrowing) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Example 14 with IntermediateCompensationEventThrowing

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

the class ThrowingIntermediateCompensationEventTest method testUnmarshallSubprocessLevelEventWithEdgesEmptyProperties.

@Test
@Override
public void testUnmarshallSubprocessLevelEventWithEdgesEmptyProperties() {
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateCompensationEventThrowing emptySubprocessEvent = getThrowingIntermediateNodeById(diagram, EMPTY_WITH_EDGES_SUBPROCESS_LEVEL_EVENT_ID, HAS_INCOME_EDGE, TWO_OUTGOING_EDGES);
    assertGeneralSet(emptySubprocessEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
    assertCompensationEventExecutionSet(emptySubprocessEvent.getExecutionSet(), DEFAULT_REFERENCE_ACTIVITY);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) IntermediateCompensationEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEventThrowing) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Test(org.junit.Test)

Example 15 with IntermediateCompensationEventThrowing

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

the class IntermediateThrowEventConverterTest method verifyCompensationEventConvert.

private void verifyCompensationEventConvert() {
    IntermediateCompensationEventThrowing definition = mock(IntermediateCompensationEventThrowing.class);
    CompensateEventDefinition eventDefinition = mock(CompensateEventDefinition.class);
    IntermediateThrowEvent intermediateThrowEvent = mockIntermediateThrowEvent(definition);
    eventDefinitions.clear();
    eventDefinitions.add(eventDefinition);
    tested.convert(intermediateThrowEvent);
    verify(tested).compensationEvent(intermediateThrowEvent, eventDefinition);
}
Also used : IntermediateCompensationEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEventThrowing) CompensateEventDefinition(org.eclipse.bpmn2.CompensateEventDefinition) IntermediateThrowEvent(org.eclipse.bpmn2.IntermediateThrowEvent)

Aggregations

IntermediateCompensationEventThrowing (org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEventThrowing)16 Test (org.junit.Test)10 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)9 Graph (org.kie.workbench.common.stunner.core.graph.Graph)9 IntermediateThrowEvent (org.eclipse.bpmn2.IntermediateThrowEvent)3 CompensationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.CompensationEventExecutionSet)3 CompensateEventDefinition (org.eclipse.bpmn2.CompensateEventDefinition)2 ActivityRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.ActivityRef)2 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)2 Edge (org.kie.workbench.common.stunner.core.graph.Edge)2 Node (org.kie.workbench.common.stunner.core.graph.Node)2 View (org.kie.workbench.common.stunner.core.graph.content.view.View)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Map (java.util.Map)1 TreeMap (java.util.TreeMap)1 Collectors (java.util.stream.Collectors)1 Inject (javax.inject.Inject)1 ThrowEvent (org.eclipse.bpmn2.ThrowEvent)1 SelectorData (org.kie.workbench.common.forms.dynamic.model.config.SelectorData)1