use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverter method escalationEvent.
protected PropertyWriter escalationEvent(Node<View<IntermediateEscalationEventThrowing>, ?> n) {
IntermediateThrowEvent event = bpmn2.createIntermediateThrowEvent();
event.setId(n.getUUID());
ThrowEventPropertyWriter p = propertyWriterFactory.of(event);
IntermediateEscalationEventThrowing definition = n.getContent().getDefinition();
p.setAbsoluteBounds(n);
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());
return p;
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverter method escalationEvent.
protected BpmnNode escalationEvent(IntermediateThrowEvent event, EscalationEventDefinition eventDefinition) {
Node<View<IntermediateEscalationEventThrowing>, Edge> node = factoryManager.newNode(event.getId(), IntermediateEscalationEventThrowing.class);
IntermediateEscalationEventThrowing definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
node.getContent().setBounds(p.getBounds());
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
definition.setDimensionsSet(p.getCircleDimensionSet());
definition.setFontSet(p.getFontSet());
definition.setBackgroundSet(p.getBackgroundSet());
definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
definition.setExecutionSet(new EscalationEventExecutionSet(new EscalationRef(EventDefinitionReader.escalationRefOf(eventDefinition))));
return BpmnNode.of(node, p);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing in project kie-wb-common by kiegroup.
the class ProcessEscalationRefProviderTest method mockIntermediateEscalationEventThrowingNode.
private Node mockIntermediateEscalationEventThrowingNode(String escalationRefValue) {
IntermediateEscalationEventThrowing event = new IntermediateEscalationEventThrowing();
event.setExecutionSet(new EscalationEventExecutionSet(new EscalationRef(escalationRefValue)));
return mockNode(event);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing in project kie-wb-common by kiegroup.
the class ThrowingIntermediateEscalationEventTest method testUnmarshallTopLevelEventFilledProperties.
@Test
@Override
public void testUnmarshallTopLevelEventFilledProperties() throws Exception {
final String EVENT_NAME = "Escalation event01 name ~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./";
final String EVENT_DOCUMENTATION = "Escalation event01 doc\n ~!@#$%^&*()_+`1234567890-={}|[]\\:\";'<>?,./";
final String EVENT_REF = "escalation01";
final String EVENT_DATA_INPUT = "input:String||||[din]processGlobalVar->input";
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
IntermediateEscalationEventThrowing filledTopEvent = getThrowingIntermediateNodeById(diagram, FILLED_TOP_LEVEL_EVENT_ID, HAS_NO_INCOME_EDGE, ZERO_OUTGOING_EDGES);
assertGeneralSet(filledTopEvent.getGeneral(), EVENT_NAME, EVENT_DOCUMENTATION);
assertEscalationEventExecutionSet(filledTopEvent.getExecutionSet(), EVENT_REF);
assertDataIOSet(filledTopEvent.getDataIOSet(), EVENT_DATA_INPUT);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing in project kie-wb-common by kiegroup.
the class ThrowingIntermediateEscalationEventTest method testUnmarshallSubprocessLevelEventWithEdgesEmptyProperties.
@Test
@Override
public void testUnmarshallSubprocessLevelEventWithEdgesEmptyProperties() {
Diagram<Graph, Metadata> diagram = getDiagram();
assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM);
IntermediateEscalationEventThrowing emptySubprocessEvent = getThrowingIntermediateNodeById(diagram, EMPTY_WITH_EDGES_SUBPROCESS_LEVEL_EVENT_ID, HAS_INCOME_EDGE, TWO_OUTGOING_EDGES);
assertGeneralSet(emptySubprocessEvent.getGeneral(), EMPTY_VALUE, EMPTY_VALUE);
assertEscalationEventExecutionSet(emptySubprocessEvent.getExecutionSet(), EMPTY_VALUE);
assertDataIOSet(emptySubprocessEvent.getDataIOSet(), EMPTY_VALUE);
}
Aggregations