Search in sources :

Example 16 with IntermediateCompensationEvent

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

the class BoundaryCatchingIntermediateCompensationEventTest method testUnmarshallTopLevelEventFilledProperties.

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

Example 17 with IntermediateCompensationEvent

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

the class BoundaryCatchingIntermediateCompensationEventTest method testUnmarshallSubprocessLevelEventFilledProperties.

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

Example 18 with IntermediateCompensationEvent

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

the class CatchingIntermediateEventFilterProviderTest method testFilterProviderDontShowCancelActivityField.

@Test
public void testFilterProviderDontShowCancelActivityField() {
    BaseCatchingIntermediateEvent[] test1Classes = { new IntermediateTimerEvent(), new IntermediateErrorEventCatching(), new IntermediateConditionalEvent(), new IntermediateCompensationEvent(), new IntermediateSignalEventCatching(), new IntermediateTimerEvent(), new IntermediateMessageEventCatching() };
    when(graphIndex.getNode(UUID)).thenReturn(noDockedNode);
    Stream.of(test1Classes).forEach(catchingIntermediateEvent -> testFilterProviderDontShowCancelActivityField(catchingIntermediateEvent));
    BaseCatchingIntermediateEvent[] test2Classes = { new IntermediateErrorEventCatching(), new IntermediateCompensationEvent() };
    when(graphIndex.getNode(UUID)).thenReturn(dockedNode);
    Stream.of(test2Classes).forEach(clazz -> testFilterProviderDontShowCancelActivityField(clazz));
}
Also used : IntermediateSignalEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching) IntermediateErrorEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateErrorEventCatching) IntermediateTimerEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateTimerEvent) IntermediateConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent) IntermediateMessageEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateMessageEventCatching) BaseCatchingIntermediateEvent(org.kie.workbench.common.stunner.bpmn.definition.BaseCatchingIntermediateEvent) IntermediateCompensationEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEvent) Test(org.junit.Test)

Aggregations

IntermediateCompensationEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEvent)18 Test (org.junit.Test)13 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)10 Graph (org.kie.workbench.common.stunner.core.graph.Graph)10 CompensateEventDefinition (org.eclipse.bpmn2.CompensateEventDefinition)3 IntermediateConditionalEvent (org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent)3 BaseCancellingEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.BaseCancellingEventExecutionSet)3 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)3 IntermediateCatchEvent (org.eclipse.bpmn2.IntermediateCatchEvent)2 EndNoneEvent (org.kie.workbench.common.stunner.bpmn.definition.EndNoneEvent)2 StartNoneEvent (org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent)2 Node (org.kie.workbench.common.stunner.core.graph.Node)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 Iterator (java.util.Iterator)1 List (java.util.List)1 Objects (java.util.Objects)1 Optional (java.util.Optional)1 Matcher (java.util.regex.Matcher)1