Search in sources :

Example 6 with EndEscalationEvent

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

the class BPMNDirectDiagramMarshallerTest method testUnmarshallEndEscalationEvent.

@Test
@SuppressWarnings("unchecked")
public void testUnmarshallEndEscalationEvent() throws Exception {
    Diagram<Graph, Metadata> diagram = unmarshall(BPMN_ENDESCALATIONEVENT);
    assertDiagram(diagram, 2);
    assertEquals("EndEscalationEvent", diagram.getMetadata().getTitle());
    Node<? extends Definition, ?> endEventNode = diagram.getGraph().getNode("_8F6A4096-26AA-4C14-B1F0-B96ED24BD5C7");
    assertNotNull(endEventNode);
    EndEscalationEvent endEscalationEvent = (EndEscalationEvent) endEventNode.getContent().getDefinition();
    assertNotNull(endEscalationEvent.getGeneral());
    assertEquals("EndEscalationEventName", endEscalationEvent.getGeneral().getName().getValue());
    assertEquals("EndEscalationEventDocumentation", endEscalationEvent.getGeneral().getDocumentation().getValue());
    assertNotNull(endEscalationEvent.getExecutionSet());
    assertEquals("EscalationCode", endEscalationEvent.getExecutionSet().getEscalationRef().getValue());
    DataIOSet dataIOSet = endEscalationEvent.getDataIOSet();
    AssignmentsInfo assignmentsInfo = dataIOSet.getAssignmentsinfo();
    assertEquals("escalationInput:String||||[din]processVar1->escalationInput", assignmentsInfo.getValue());
}
Also used : DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) Graph(org.kie.workbench.common.stunner.core.graph.Graph) AssignmentsInfo(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo) ParsedAssignmentsInfo(org.kie.workbench.common.stunner.bpmn.backend.converters.customproperties.ParsedAssignmentsInfo) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) EndEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.EndEscalationEvent) Test(org.junit.Test)

Example 7 with EndEscalationEvent

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

the class EndEscalationEventTest method testUnmarshallTopLevelEmptyEventProperties.

@Test
@Override
public void testUnmarshallTopLevelEmptyEventProperties() throws Exception {
    Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_END_EVENT_FILE_PATH);
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    EndEscalationEvent emptyTopEvent = getEndNodeById(diagram, EMPTY_TOP_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE);
    assertGeneralSet(emptyTopEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) EndEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.EndEscalationEvent) Test(org.junit.Test)

Example 8 with EndEscalationEvent

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

the class EndEscalationEventTest method testUnmarshallSubprocessLevelEventFilledProperties.

@Test
@Override
public void testUnmarshallSubprocessLevelEventFilledProperties() throws Exception {
    final String EVENT_NAME = "Escalation event03 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
    final String EVENT_DOCUMENTATION = "Escalation event03 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
    final String EVENT_REF = "escEv03";
    final String EVENT_DATA_OUTPUT = "input:String||||[din]processGlobalVar->input";
    Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_END_EVENT_FILE_PATH);
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    EndEscalationEvent filledSubprocessEvent = getEndNodeById(diagram, FILLED_SUBPROCESS_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE);
    assertGeneralSet(filledSubprocessEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
    assertEscalationEventExecutionSet(filledSubprocessEvent.getExecutionSet(), EVENT_REF);
    assertDataIOSet(filledSubprocessEvent.getDataIOSet(), EVENT_DATA_OUTPUT);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) EndEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.EndEscalationEvent) Test(org.junit.Test)

Example 9 with EndEscalationEvent

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

the class EndEscalationEventTest method testUnmarshallSubprocessLevelEventEmptyProperties.

@Test
@Override
public void testUnmarshallSubprocessLevelEventEmptyProperties() throws Exception {
    Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_END_EVENT_FILE_PATH);
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    EndEscalationEvent emptySubprocessEvent = getEndNodeById(diagram, EMPTY_SUBPROCESS_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE);
    assertGeneralSet(emptySubprocessEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) EndEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.EndEscalationEvent) Test(org.junit.Test)

Example 10 with EndEscalationEvent

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

the class EndEscalationEventTest method testUnmarshallTopLevelEventWithIncomeFilledProperties.

@Test
@Override
public void testUnmarshallTopLevelEventWithIncomeFilledProperties() throws Exception {
    final String EVENT_NAME = "Escalation event02 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
    final String EVENT_DOCUMENTATION = "Escalation event02 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
    final String EVENT_REF = "escEv02";
    final String EVENT_DATA_OUTPUT = "input:String||||[din]processGlobalVar->input";
    Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_END_EVENT_FILE_PATH);
    assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
    EndEscalationEvent filledSubprocessEvent = getEndNodeById(diagram, FILLED_WITH_INCOME_TOP_LEVEL_EVENT_ID, HAS_INCOME_EDGE);
    assertGeneralSet(filledSubprocessEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
    assertEscalationEventExecutionSet(filledSubprocessEvent.getExecutionSet(), EVENT_REF);
    assertDataIOSet(filledSubprocessEvent.getDataIOSet(), EVENT_DATA_OUTPUT);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) EndEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.EndEscalationEvent) Test(org.junit.Test)

Aggregations

EndEscalationEvent (org.kie.workbench.common.stunner.bpmn.definition.EndEscalationEvent)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 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)3 EscalationEventExecutionSet (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationEventExecutionSet)3 EmbeddedSubprocess (org.kie.workbench.common.stunner.bpmn.definition.EmbeddedSubprocess)2 IntermediateSignalEventThrowing (org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventThrowing)2 UserTask (org.kie.workbench.common.stunner.bpmn.definition.UserTask)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 EndEvent (org.eclipse.bpmn2.EndEvent)1 Before (org.junit.Before)1 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