private PropertyWriter businessRuleTask(Node<View<BusinessRuleTask>, ?> n) { org.eclipse.bpmn2.BusinessRuleTask task = bpmn2.createBusinessRuleTask(); task.setId(n.getUUID()); BusinessRuleTask definition = n.getContent().getDefinition(); BusinessRuleTaskPropertyWriter p = propertyWriterFactory.of(task); TaskGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); BusinessRuleTaskExecutionSet executionSet = definition.getExecutionSet(); p.setAsync(executionSet.getIsAsync().getValue()); p.setOnEntryAction(executionSet.getOnEntryAction()); p.setOnExitAction(executionSet.getOnExitAction()); p.setAdHocAutostart(executionSet.getAdHocAutostart().getValue()); RuleLanguage ruleLanguage = executionSet.getRuleLanguage(); p.setImplementation(ruleLanguage); if (ruleLanguage.getValue().equals(RuleLanguage.DRL)) { p.setRuleFlowGroup(executionSet.getRuleFlowGroup()); } else if (ruleLanguage.getValue().equals(RuleLanguage.DMN)) { p.setNamespace(executionSet.getNamespace()); p.setDecisionName(executionSet.getDecisionName()); p.setDmnModelName(executionSet.getDmnModelName()); } p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo()); p.setSimulationSet(definition.getSimulationSet()); p.setBounds(n.getContent().getBounds()); return p; }
businessRuleTask.getExecutionSet().getOnEntryAction().getValue().getValues().get(0).getScript()); businessRuleTask.getExecutionSet().getOnEntryAction().getValue().getValues().get(0).getLanguage());
businessRuleTask.getExecutionSet().getOnEntryAction().getValue().getValues().get(0).getScript()); businessRuleTask.getExecutionSet().getOnEntryAction().getValue().getValues().get(0).getLanguage());
assertNotNull(executionSet.getDmnModelName()); assertNotNull(executionSet.getDmnModelName()); assertNotNull(executionSet.getOnEntryAction()); assertNotNull(executionSet.getOnExitAction()); assertNotNull(executionSet.getIsAsync()); assertNotNull(executionSet.getAdHocAutostart()); assertNotNull(executionSet.getOnEntryAction().getValue()); assertNotNull(executionSet.getOnExitAction().getValue()); List<ScriptTypeValue> onEntryScriptTypeValues = executionSet.getOnEntryAction().getValue().getValues(); List<ScriptTypeValue> onExitScriptTypeValues = executionSet.getOnExitAction().getValue().getValues();