use of org.kie.workbench.common.stunner.bpmn.definition.property.event.BaseCancellingEventExecutionSet in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverter method compensationEvent.
protected PropertyWriter compensationEvent(Node<View<IntermediateCompensationEvent>, ?> n) {
CatchEventPropertyWriter p = createCatchEventPropertyWriter(n);
p.getFlowElement().setId(n.getUUID());
p.setAbsoluteBounds(n);
IntermediateCompensationEvent 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());
BaseCancellingEventExecutionSet executionSet = definition.getExecutionSet();
p.addSlaDueDate(executionSet.getSlaDueDate());
p.addCompensation();
return p;
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.BaseCancellingEventExecutionSet in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverterTest method createIntermediateCompensationEventCatchingNode.
private Node createIntermediateCompensationEventCatchingNode() {
BaseCancellingEventExecutionSet executionSet = new BaseCancellingEventExecutionSet(new CancelActivity(CANCEL_ACTIVITY), slaDueDate);
IntermediateCompensationEvent eventCatching = new IntermediateCompensationEvent(generalSet, mock(BackgroundSet.class), mock(FontSet.class), mock(CircleDimensionSet.class), dataIOSet, advancedData, executionSet);
Node dockNode = mockNode();
Node node = mockDockedNode(dockNode, eventCatching);
return node;
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.BaseCancellingEventExecutionSet in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverter method compensationEvent.
protected Result<BpmnNode> compensationEvent(CatchEvent event) {
String nodeId = event.getId();
Node<View<IntermediateCompensationEvent>, Edge> node = factoryManager.newNode(nodeId, IntermediateCompensationEvent.class);
IntermediateCompensationEvent 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()));
CancelActivity cancelActivity = new CancelActivity(false);
SLADueDate slaDueDate = new SLADueDate(p.getSlaDueDate());
BaseCancellingEventExecutionSet executionSet = new BaseCancellingEventExecutionSet(cancelActivity, slaDueDate);
definition.setExecutionSet(executionSet);
return Result.success(BpmnNode.of(node, p));
}
Aggregations