use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverterTest method verifyBoundaryEscalationEventConvert.
private void verifyBoundaryEscalationEventConvert() {
IntermediateEscalationEvent definition = mock(IntermediateEscalationEvent.class);
EscalationEventDefinition eventDefinition = mock(EscalationEventDefinition.class);
BoundaryEvent boundaryEvent = mockBoundaryEvent(definition);
eventDefinitions.clear();
eventDefinitions.add(eventDefinition);
tested.convertBoundaryEvent(boundaryEvent);
verify(tested).escalationEvent(boundaryEvent, eventDefinition);
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverter method escalationEvent.
protected PropertyWriter escalationEvent(Node<View<IntermediateEscalationEvent>, ?> n) {
CatchEventPropertyWriter p = createCatchEventPropertyWriter(n);
p.getFlowElement().setId(n.getUUID());
p.setAbsoluteBounds(n);
IntermediateEscalationEvent definition = n.getContent().getDefinition();
BPMNGeneralSet general = definition.getGeneral();
p.setName(general.getName().getValue());
p.setDocumentation(general.getDocumentation().getValue());
p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
CancellingEscalationEventExecutionSet executionSet = definition.getExecutionSet();
p.setCancelActivity(executionSet.getCancelActivity().getValue());
p.addSlaDueDate(executionSet.getSlaDueDate());
p.addEscalation(executionSet.getEscalationRef());
return p;
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverter method escalationEvent.
protected Result<BpmnNode> escalationEvent(CatchEvent event, EscalationEventDefinition e) {
String nodeId = event.getId();
Node<View<IntermediateEscalationEvent>, Edge> node = factoryManager.newNode(nodeId, IntermediateEscalationEvent.class);
IntermediateEscalationEvent definition = node.getContent().getDefinition();
CatchEventPropertyReader p = propertyReaderFactory.of(event);
node.getContent().setBounds(p.getBounds());
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setBackgroundSet(p.getBackgroundSet());
definition.setFontSet(p.getFontSet());
definition.setDimensionsSet(p.getCircleDimensionSet());
definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
definition.setExecutionSet(new CancellingEscalationEventExecutionSet(new CancelActivity(p.isCancelActivity()), new SLADueDate(p.getSlaDueDate()), new EscalationRef(EventDefinitionReader.escalationRefOf(e))));
return Result.success(BpmnNode.of(node, p));
}
use of org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent in project kie-wb-common by kiegroup.
the class ProcessEscalationRefProviderTest method mockIntermediateEscalationEventCatchingNode.
private Node mockIntermediateEscalationEventCatchingNode(String escalationRefValue) {
IntermediateEscalationEvent event = new IntermediateEscalationEvent();
event.setExecutionSet(new CancellingEscalationEventExecutionSet(new CancelActivity(true), new SLADueDate(), new EscalationRef(escalationRefValue)));
return mockNode(event);
}
Aggregations