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());
}
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);
}
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);
}
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);
}
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);
}
Aggregations