use of org.kie.workbench.common.stunner.bpmn.definition.EndEscalationEvent in project kie-wb-common by kiegroup.
the class EndEventConverter method escalationEvent.
private PropertyWriter escalationEvent(Node<View<EndEscalationEvent>, ?> n) {
EndEvent event = bpmn2.createEndEvent();
event.setId(n.getUUID());
EndEscalationEvent definition = n.getContent().getDefinition();
ThrowEventPropertyWriter p = propertyWriterFactory.of(event);
BPMNGeneralSet general = definition.getGeneral();
p.setName(general.getName().getValue());
p.setDocumentation(general.getDocumentation().getValue());
p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
EscalationEventExecutionSet executionSet = definition.getExecutionSet();
p.addEscalation(executionSet.getEscalationRef());
p.setAbsoluteBounds(n);
return p;
}
use of org.kie.workbench.common.stunner.bpmn.definition.EndEscalationEvent in project kie-wb-common by kiegroup.
the class VariableUtilsTest method mockEndEscalationEvent.
private EndEscalationEvent mockEndEscalationEvent(String name, String assignmentsInfoValue) {
EndEscalationEvent result = mockEndEvent(name, EndEscalationEvent.class);
AssignmentsInfo assignmentsInfo = mockAssignmentsInfo(assignmentsInfoValue);
DataIOSet dataIOSet = mockIOSet(assignmentsInfo);
when(result.getDataIOSet()).thenReturn(dataIOSet);
return result;
}
use of org.kie.workbench.common.stunner.bpmn.definition.EndEscalationEvent in project kie-wb-common by kiegroup.
the class EventSubProcessPostConverterTest method setUp.
@Before
@SuppressWarnings("unchecked")
public void setUp() {
when(nodeWriter.getElement()).thenReturn(subProcess);
outEdges = new ArrayList<>();
outEdges.add(mockEdge(mock(Node.class), newNode(new IntermediateTimerEvent())));
outEdges.add(mockEdge(mock(Node.class), newNode(new UserTask())));
outEdges.add(mockEdge(mock(Node.class), newNode(new ScriptTask())));
outEdges.add(mockEdge(mock(Node.class), newNode(new IntermediateSignalEventThrowing())));
outEdges.add(mockEdge(mock(Node.class), newNode(new EmbeddedSubprocess())));
outEdges.add(mockEdge(mock(Node.class), newNode(new EndEscalationEvent())));
when(eventSubprocessNode.getOutEdges()).thenReturn(outEdges);
converter = new EventSubProcessPostConverter();
}
use of org.kie.workbench.common.stunner.bpmn.definition.EndEscalationEvent in project kie-wb-common by kiegroup.
the class AbstractDataTypeCacheTest method testExtractEndEscalationEvent.
@Test
public void testExtractEndEscalationEvent() {
EndEscalationEvent endEscalationEvent = new EndEscalationEvent();
EndEscalationEvent endEscalationEvent2 = new EndEscalationEvent();
when(firstView.getDefinition()).thenReturn(endEscalationEvent);
when(lastView.getDefinition()).thenReturn(endEscalationEvent2);
dataTypeCache.extractFromItem(firstView);
dataTypeCache.extractFromItem(lastView);
assertTrue(dataTypeCache.allDataTypes.contains("MyType"));
assertTrue(dataTypeCache.allDataTypes.contains("com.myspace.Person"));
}
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());
}
Aggregations