use of org.kie.workbench.common.stunner.bpmn.definition.property.event.conditional.CancellingConditionalEventExecutionSet in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverterTest method createIntermediateConditionalEventCatchingNode.
private Node createIntermediateConditionalEventCatchingNode() {
CancellingConditionalEventExecutionSet executionSet = new CancellingConditionalEventExecutionSet(new CancelActivity(CANCEL_ACTIVITY), slaDueDate, conditionExpression);
IntermediateConditionalEvent eventCatching = new IntermediateConditionalEvent(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.conditional.CancellingConditionalEventExecutionSet in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverter method conditionalEvent.
protected PropertyWriter conditionalEvent(Node<View<IntermediateConditionalEvent>, ?> n) {
CatchEventPropertyWriter p = createCatchEventPropertyWriter(n);
p.getFlowElement().setId(n.getUUID());
p.setAbsoluteBounds(n);
IntermediateConditionalEvent 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());
CancellingConditionalEventExecutionSet executionSet = definition.getExecutionSet();
p.setCancelActivity(executionSet.getCancelActivity().getValue());
p.addSlaDueDate(executionSet.getSlaDueDate());
p.addCondition(executionSet.getConditionExpression());
return p;
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.conditional.CancellingConditionalEventExecutionSet in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverter method conditionalEvent.
protected Result<BpmnNode> conditionalEvent(CatchEvent event, ConditionalEventDefinition e) {
String nodeId = event.getId();
Node<View<IntermediateConditionalEvent>, Edge> node = factoryManager.newNode(nodeId, IntermediateConditionalEvent.class);
IntermediateConditionalEvent 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 CancellingConditionalEventExecutionSet(new CancelActivity(p.isCancelActivity()), new SLADueDate(p.getSlaDueDate()), p.getConditionExpression(e)));
return Result.success(BpmnNode.of(node, p));
}
Aggregations