use of org.kie.workbench.common.stunner.bpmn.definition.property.task.DmnModelName in project kie-wb-common by kiegroup.
the class BaseTaskConverter method businessRuleTask.
private BpmnNode businessRuleTask(org.eclipse.bpmn2.BusinessRuleTask task) {
Node<View<BusinessRuleTask>, Edge> node = factoryManager.newNode(task.getId(), BusinessRuleTask.class);
BusinessRuleTask definition = node.getContent().getDefinition();
BusinessRuleTaskPropertyReader p = propertyReaderFactory.of(task);
definition.setGeneral(new TaskGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
RuleLanguage ruleLanguage = new RuleLanguage(p.getImplementation());
RuleFlowGroup ruleFlowGroup = null;
Namespace namespace = null;
DecisionName decisionName = null;
DmnModelName dmnModelName = null;
if (ruleLanguage.getValue().equals(RuleLanguage.DRL)) {
ruleFlowGroup = new RuleFlowGroup(p.getRuleFlowGroup());
namespace = new Namespace();
decisionName = new DecisionName();
dmnModelName = new DmnModelName();
} else if (ruleLanguage.getValue().equals(RuleLanguage.DMN)) {
ruleFlowGroup = new RuleFlowGroup();
namespace = new Namespace(p.getNamespace());
decisionName = new DecisionName(p.getDecisionName());
dmnModelName = new DmnModelName(p.getDmnModelName());
}
definition.setExecutionSet(new BusinessRuleTaskExecutionSet(new RuleLanguage(p.getImplementation()), ruleFlowGroup, namespace, decisionName, dmnModelName, new OnEntryAction(p.getOnEntryAction()), new OnExitAction(p.getOnExitAction()), new IsAsync(p.isAsync()), new AdHocAutostart(p.isAdHocAutoStart()), new SLADueDate(p.getSlaDueDate())));
definition.setSimulationSet(p.getSimulationSet());
definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
node.getContent().setBounds(p.getBounds());
definition.setDimensionsSet(p.getRectangleDimensionsSet());
definition.setBackgroundSet(p.getBackgroundSet());
definition.setFontSet(p.getFontSet());
return BpmnNode.of(node, p);
}
Aggregations