Search in sources :

Example 11 with IntermediateEscalationEventThrowing

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

the class ThrowingIntermediateEscalationEventTest method testUnmarshallTopLevelEmptyEventProperties.

@Test
@Override
public void testUnmarshallTopLevelEmptyEventProperties() throws Exception {
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateEscalationEventThrowing emptyTopEvent = getThrowingIntermediateNodeById(diagram, EMPTY_TOP_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, ZERO_OUTGOING_EDGES);
    assertGeneralSet(emptyTopEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
    assertEscalationEventExecutionSet(emptyTopEvent.getExecutionSet(), EMPTY_VALUE);
    assertDataIOSet(emptyTopEvent.getDataIOSet(), EMPTY_VALUE);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) IntermediateEscalationEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing) Test(org.junit.Test)

Example 12 with IntermediateEscalationEventThrowing

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

the class ThrowingIntermediateEscalationEventTest method testUnmarshallTopLevelEventWithEdgesEmptyProperties.

@Test
@Override
public void testUnmarshallTopLevelEventWithEdgesEmptyProperties() {
    Diagram<Graph, Metadata> diagram = getDiagram();
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    IntermediateEscalationEventThrowing emptyEvent = getThrowingIntermediateNodeById(diagram, EMPTY_WITH_EDGES_TOP_LEVEL_EVENT_ID, HAS_INCOME_EDGE, TWO_OUTGOING_EDGES);
    assertGeneralSet(emptyEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
    assertEscalationEventExecutionSet(emptyEvent.getExecutionSet(), EMPTY_VALUE);
    assertDataIOSet(emptyEvent.getDataIOSet(), EMPTY_VALUE);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) IntermediateEscalationEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing) Test(org.junit.Test)

Example 13 with IntermediateEscalationEventThrowing

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

the class ThrowingIntermediateEscalationEventTest method testUnmarshallSubprocessLevelEventEmptyProperties.

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

Example 14 with IntermediateEscalationEventThrowing

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

the class IntermediateThrowEventConverterTest method escalationEvent.

@Test
public void escalationEvent() {
    IntermediateEscalationEventThrowing definition = mock(IntermediateEscalationEventThrowing.class);
    EscalationEventDefinition eventDefinition = mock(EscalationEventDefinition.class);
    IntermediateThrowEvent intermediateThrowEvent = mockIntermediateThrowEvent(definition);
    tested.escalationEvent(intermediateThrowEvent, eventDefinition);
    verifyCommonProperties(definition);
    verify(eventDefinition).getEscalationRef();
    verify(definition).setExecutionSet(any(EscalationEventExecutionSet.class));
}
Also used : EscalationEventDefinition(org.eclipse.bpmn2.EscalationEventDefinition) EscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationEventExecutionSet) IntermediateThrowEvent(org.eclipse.bpmn2.IntermediateThrowEvent) IntermediateEscalationEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing) Test(org.junit.Test)

Example 15 with IntermediateEscalationEventThrowing

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

the class IntermediateThrowEventConverterTest method verifyEscalationEventConvert.

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

Aggregations

IntermediateEscalationEventThrowing (org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing)18 Test (org.junit.Test)11 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)9 Graph (org.kie.workbench.common.stunner.core.graph.Graph)9 EscalationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationEventExecutionSet)5 IntermediateThrowEvent (org.eclipse.bpmn2.IntermediateThrowEvent)3 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)3 EscalationEventDefinition (org.eclipse.bpmn2.EscalationEventDefinition)2 AssignmentsInfo (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo)2 EscalationRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef)2 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)2 ParsedAssignmentsInfo (org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo)1 ThrowEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ThrowEventPropertyWriter)1 EventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader)1 ThrowEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader)1 AdHocSubprocess (org.kie.workbench.common.stunner.bpmn.definition.AdHocSubprocess)1 BPMNDiagramImpl (org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl)1 BusinessRuleTask (org.kie.workbench.common.stunner.bpmn.definition.BusinessRuleTask)1 DataObject (org.kie.workbench.common.stunner.bpmn.definition.DataObject)1 EmbeddedSubprocess (org.kie.workbench.common.stunner.bpmn.definition.EmbeddedSubprocess)1