Search in sources :

Example 1 with StartCompensationEvent

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

the class StartEventFilterProviderFactoryTest method testFilterProviderHideIsInterruptingField.

@Test
public void testFilterProviderHideIsInterruptingField() {
    BaseStartEvent[] test1Classes = { new StartNoneEvent(), new StartCompensationEvent(), new StartSignalEvent(), new StartTimerEvent(), new StartConditionalEvent(), new StartErrorEvent(), new StartEscalationEvent(), new StartMessageEvent() };
    when(parentView.getDefinition()).thenReturn(otherNode);
    Stream.of(test1Classes).forEach(catchingIntermediateEvent -> testStartEventFilterProviderHideIsInterruptingField(catchingIntermediateEvent));
    BaseStartEvent[] test2Classes = { new StartNoneEvent(), new StartCompensationEvent(), new StartErrorEvent() };
    when(parentView.getDefinition()).thenReturn(eventSubprocess);
    Stream.of(test2Classes).forEach(clazz -> testStartEventFilterProviderHideIsInterruptingField(clazz));
}
Also used : BaseStartEvent(org.kie.workbench.common.stunner.bpmn.definition.BaseStartEvent) StartSignalEvent(org.kie.workbench.common.stunner.bpmn.definition.StartSignalEvent) StartMessageEvent(org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent) StartTimerEvent(org.kie.workbench.common.stunner.bpmn.definition.StartTimerEvent) StartEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent) StartConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.StartConditionalEvent) StartErrorEvent(org.kie.workbench.common.stunner.bpmn.definition.StartErrorEvent) StartNoneEvent(org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent) StartCompensationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartCompensationEvent) Test(org.junit.Test)

Example 2 with StartCompensationEvent

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

the class StartCompensationEventTest method testUnmarshallTopLevelEventFilledProperties.

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

Example 3 with StartCompensationEvent

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

the class StartCompensationEventTest method testUnmarshallTopLevelEmptyEventProperties.

@Test
@Override
public void testUnmarshallTopLevelEmptyEventProperties() throws Exception {
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    StartCompensationEvent emptyTopLevelEvent = getStartNodeById(diagram, EMPTY_TOP_LEVEL_EVENT_ID);
    assertGeneralSet(emptyTopLevelEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
    assertNotNull(emptyTopLevelEvent.getExecutionSet());
    assertStartEventSlaDueDate(emptyTopLevelEvent.getExecutionSet(), EMPTY_VALUE);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) StartCompensationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartCompensationEvent) Test(org.junit.Test)

Example 4 with StartCompensationEvent

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

the class StartCompensationEventTest method testUnmarshallSubprocessLevelEventFilledProperties.

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

Example 5 with StartCompensationEvent

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

the class EventSubProcessPostConverterTest method testProcessWhenIsForCompensation.

@Test
@SuppressWarnings("unchecked")
public void testProcessWhenIsForCompensation() {
    outEdges.add(mockEdge(mock(Node.class), newNode(new StartCompensationEvent())));
    converter.process(processWriter, nodeWriter, eventSubprocessNode);
    verify(subProcess).setIsForCompensation(true);
}
Also used : StartCompensationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartCompensationEvent) Test(org.junit.Test)

Aggregations

StartCompensationEvent (org.kie.workbench.common.stunner.bpmn.definition.StartCompensationEvent)9 Test (org.junit.Test)7 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)5 Graph (org.kie.workbench.common.stunner.core.graph.Graph)5 BaseStartEvent (org.kie.workbench.common.stunner.bpmn.definition.BaseStartEvent)2 BaseStartEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.BaseStartEventExecutionSet)2 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)2 StartEvent (org.eclipse.bpmn2.StartEvent)1 CatchEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter)1 CatchEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader)1 EventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader)1 StartConditionalEvent (org.kie.workbench.common.stunner.bpmn.definition.StartConditionalEvent)1 StartErrorEvent (org.kie.workbench.common.stunner.bpmn.definition.StartErrorEvent)1 StartEscalationEvent (org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent)1 StartMessageEvent (org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent)1 StartNoneEvent (org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent)1 StartSignalEvent (org.kie.workbench.common.stunner.bpmn.definition.StartSignalEvent)1 StartTimerEvent (org.kie.workbench.common.stunner.bpmn.definition.StartTimerEvent)1 IsInterrupting (org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting)1 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)1