public Map<String, String> getInMappings() { Map<String,String> in = new HashMap<String, String>(); for(DataAssociation a : inMapping) { if(a.getSources().size() ==1 && (a.getAssignments() == null || a.getAssignments().size()==0) && a.getTransformation() == null) { in.put(a.getTarget(), a.getSources().get(0)); } } return in; }
public Map<String, String> getInMappings() { Map<String,String> in = new HashMap<String, String>(); for(DataAssociation a : inMapping) { if(a.getSources().size() ==1 && (a.getAssignments() == null || a.getAssignments().size()==0) && a.getTransformation() == null) { in.put(a.getTarget(), a.getSources().get(0)); } } return in; }
public Map<String, String> getOutMappings() { Map<String,String> out = new HashMap<String, String>(); for(DataAssociation a : outMapping) { if(a.getSources().size() ==1 && (a.getAssignments() == null || a.getAssignments().size()==0) && a.getTransformation() == null) { out.put(a.getSources().get(0), a.getTarget()); } } return out; }
public Map<String, String> getOutMappings() { Map<String,String> out = new HashMap<String, String>(); for(DataAssociation assoc : outMapping) { if( assoc.getSources().size() == 1 && (assoc.getAssignments() == null || assoc.getAssignments().size() == 0) && assoc.getTransformation() == null ) { out.put(assoc.getSources().get(0), assoc.getTarget()); } } return out; }
public Map<String, String> getInMappings() { Map<String,String> in = new HashMap<String, String>(); for(DataAssociation a : inMapping) { if(a.getSources().size() ==1 && (a.getAssignments() == null || a.getAssignments().size()==0) && a.getTransformation() == null) { in.put(a.getSources().get(0), a.getTarget()); } } return in; }
public Map<String, String> getOutMappings() { Map<String,String> out = new HashMap<String, String>(); for(DataAssociation a : outMapping) { if(a.getSources().size() ==1 && (a.getAssignments() == null || a.getAssignments().size()==0) && a.getTransformation() == null) { out.put(a.getSources().get(0), a.getTarget()); } } return out; }
public Map<String, String> getInMappings() { Map<String,String> in = new HashMap<String, String>(); for(DataAssociation a : inMapping) { if(a.getSources().size() ==1 && (a.getAssignments() == null || a.getAssignments().size()==0) && a.getTransformation() == null) { in.put(a.getTarget(), a.getSources().get(0)); } } return in; }
public Map<String, String> getOutMappings() { Map<String,String> out = new HashMap<String, String>(); for(DataAssociation a : outMapping) { if(a.getSources().size() ==1 && (a.getAssignments() == null || a.getAssignments().size()==0) && a.getTransformation() == null) { out.put(a.getSources().get(0), a.getTarget()); } } return out; }
public void validateWorkItemResultVariable(String processName, List<DataAssociation> outputs, WorkItem workItem) { // in case work item results are skip validation as there is no notion of mandatory data outputs if (!variableStrictEnabled || workItem.getResults().isEmpty()) { return; } List<String> outputNames = new ArrayList<String>(); for (DataAssociation association : outputs) { if (association.getSources() != null) { outputNames.add(association.getSources().get(0)); } if (association.getAssignments() != null) { for (Iterator<Assignment> it = association.getAssignments().iterator(); it.hasNext();) { outputNames.add(it.next().getFrom()); } } } for (String outputName : workItem.getResults().keySet()) { if (!outputNames.contains(outputName) && !defaultOutputVariables.contains(outputName)) { throw new IllegalArgumentException("Data output '" + outputName + "' is not defined in process '" + processName + "' for task '" + workItem.getParameter("NodeName") + "'"); } } }
Object parameterValue = null; VariableScopeInstance variableScopeInstance = (VariableScopeInstance) resolveContextInstance(VariableScope.VARIABLE_SCOPE, association.getSources().get(0)); if (variableScopeInstance != null) { parameterValue = variableScopeInstance.getVariable(association.getSources().get(0)); } else { try { parameterValue = MVELSafeHelper.getEvaluator().eval(association.getSources().get(0), new NodeInstanceResolverFactory(this)); } catch (Throwable t) { logger.error("Could not find variable scope for variable {}", association.getSources().get(0)); logger.error("when trying to execute RuleSetNode {}", ruleSetNode.getName()); logger.error("Continuing without setting parameter.");
protected Map<String, Object> getSourceParameters(DataAssociation association) { Map<String, Object> parameters = new HashMap<String, Object>(); for (String sourceParam : association.getSources()) { Object parameterValue = null; VariableScopeInstance variableScopeInstance = (VariableScopeInstance) resolveContextInstance(VariableScope.VARIABLE_SCOPE, sourceParam); if (variableScopeInstance != null) { parameterValue = variableScopeInstance.getVariable(sourceParam); } else { try { parameterValue = MVELSafeHelper.getEvaluator().eval(sourceParam, new NodeInstanceResolverFactory(this)); } catch (Throwable t) { logger.warn("Could not find variable scope for variable {}", sourceParam); } } if (parameterValue != null) { parameters.put(association.getTarget(), parameterValue); } } return parameters; }
protected Map<String, Object> getSourceParameters(DataAssociation association) { Map<String, Object> parameters = new HashMap<String, Object>(); for (String sourceParam : association.getSources()) { Object parameterValue = null; VariableScopeInstance variableScopeInstance = (VariableScopeInstance) resolveContextInstance(VariableScope.VARIABLE_SCOPE, sourceParam); if (variableScopeInstance != null) { parameterValue = variableScopeInstance.getVariable(sourceParam); } else { try { parameterValue = MVELSafeHelper.getEvaluator().eval(sourceParam, new NodeInstanceResolverFactory(this)); } catch (Throwable t) { logger.warn("Could not find variable scope for variable {}", sourceParam); } } if (parameterValue != null) { parameters.put(association.getTarget(), parameterValue); } } return parameters; }
protected Map<String, Object> getSourceParameters(DataAssociation association) { Map<String, Object> parameters = new HashMap<String, Object>(); for (String sourceParam : association.getSources()) { Object parameterValue = null; VariableScopeInstance variableScopeInstance = (VariableScopeInstance) resolveContextInstance(VariableScope.VARIABLE_SCOPE, sourceParam); if (variableScopeInstance != null) { parameterValue = variableScopeInstance.getVariable(sourceParam); } else { try { parameterValue = MVELSafeHelper.getEvaluator().eval(sourceParam, new NodeInstanceResolverFactory(this)); } catch (Throwable t) { logger.warn("Could not find variable scope for variable {}", sourceParam); } } if (parameterValue != null) { parameters.put(association.getTarget(), parameterValue); } } return parameters; }
VariableScopeInstance variableScopeInstance = (VariableScopeInstance) resolveContextInstance(VariableScope.VARIABLE_SCOPE, association.getSources().get(0)); if (variableScopeInstance != null) { parameterValue = variableScopeInstance.getVariable(association.getSources().get(0)); } else { try { parameterValue = MVELSafeHelper.getEvaluator().eval(association.getSources().get(0), new NodeInstanceResolverFactory(this)); } catch (Throwable t) { logger.error("Could not find variable scope for variable {}", association.getSources().get(0)); logger.error("when trying to execute Work Item {}", work.getName()); logger.error("Continuing without setting parameter.");
assertThat(humanTaskOne.getInAssociations().get(0).getSources()).hasSize(1); assertThat(humanTaskOne.getInAssociations().get(0).getSources().get(0)).isEqualTo("caseFile_invoice"); assertThat(humanTaskOne.getInAssociations().get(0).getTarget()).isEqualTo("invoice"); assertThat(humanTaskOne.getOutAssociations().get(0).getSources()).hasSize(1); assertThat(humanTaskOne.getOutAssociations().get(0).getSources().get(0)).isEqualTo("approval"); assertThat(humanTaskOne.getOutAssociations().get(0).getTarget()).isEqualTo("caseFile_invoice"); assertThat(processNode.isIndependent()).isFalse(); assertThat(processNode.getInAssociations()).hasSize(1); assertThat(processNode.getInAssociations().get(0).getSources()).hasSize(1); assertThat(processNode.getInAssociations().get(0).getSources().get(0)).isEqualTo("caseFile_invoice"); assertThat(processNode.getInAssociations().get(0).getTarget()).isEqualTo("invoiceDoc"); assertThat(processNode.getOutAssociations().get(0).getSources()).hasSize(1); assertThat(processNode.getOutAssociations().get(0).getSources().get(0)).isEqualTo("approved"); assertThat(processNode.getOutAssociations().get(0).getTarget()).isEqualTo("caseFile_invoice"); assertThat(humanTaskOne.getInAssociations().get(0).getSources()).hasSize(1); assertThat(humanTaskOne.getInAssociations().get(0).getSources().get(0)).isEqualTo("caseFile_invoice"); assertThat(humanTaskOne.getInAssociations().get(0).getTarget()).isEqualTo("invoice"); assertThat(humanTaskOne.getOutAssociations().get(0).getSources()).hasSize(1); assertThat(humanTaskOne.getOutAssociations().get(0).getSources().get(0)).isEqualTo("approved"); assertThat(humanTaskOne.getOutAssociations().get(0).getTarget()).isEqualTo("caseFile_invoice"); assertThat(decisionTask.getInAssociations().get(0).getSources()).hasSize(1); assertThat(decisionTask.getInAssociations().get(0).getSources().get(0)).isEqualTo("caseFile_invoice"); assertThat(decisionTask.getInAssociations().get(0).getTarget()).isEqualTo("toApprove");
assertThat(humanTaskOne.getInAssociations().get(0).getSources()).hasSize(1); assertThat(humanTaskOne.getInAssociations().get(0).getSources().get(0)).isEqualTo("caseFile_invoice"); assertThat(humanTaskOne.getInAssociations().get(0).getTarget()).isEqualTo("invoice"); assertThat(humanTaskOne.getInAssociations().get(0).getSources()).hasSize(1); assertThat(humanTaskOne.getInAssociations().get(0).getSources().get(0)).isEqualTo("caseFile_shipped"); assertThat(humanTaskOne.getInAssociations().get(0).getTarget()).isEqualTo("shipped"); assertThat(humanTaskOne.getInAssociations().get(1).getSources()).hasSize(1); assertThat(humanTaskOne.getInAssociations().get(1).getSources().get(0)).isEqualTo("caseFile_invoice"); assertThat(humanTaskOne.getInAssociations().get(1).getTarget()).isEqualTo("invoiceApproved"); assertThat(humanTaskOne.getOutAssociations().get(0).getSources()).hasSize(1); assertThat(humanTaskOne.getOutAssociations().get(0).getSources().get(0)).isEqualTo("shippedConfirmed"); assertThat(humanTaskOne.getOutAssociations().get(0).getTarget()).isEqualTo("caseFile_shipped");
assertThat(humanTaskOne.getInAssociations().get(0).getSources()).hasSize(1); assertThat(humanTaskOne.getInAssociations().get(0).getSources().get(0)).isEqualTo("caseFile_document"); assertThat(humanTaskOne.getInAssociations().get(0).getTarget()).isEqualTo("test"); assertThat(humanTaskOne.getOutAssociations()).hasSize(0);
resolveContextInstance(VariableScope.VARIABLE_SCOPE, mapping.getTarget()); if (variableScopeInstance != null) { Object value = subProcessVariableScopeInstance.getVariable(mapping.getSources().get(0)); if (value == null) { try { value = MVELSafeHelper.getEvaluator().eval(mapping.getSources().get(0), new VariableScopeResolverFactory(subProcessVariableScopeInstance)); } catch (Throwable t) {
resolveContextInstance(VariableScope.VARIABLE_SCOPE, association.getTarget()); if (variableScopeInstance != null) { Object value = objects.get(association.getSources().get(0)); if (value == null) { try { value = MVELSafeHelper.getEvaluator().eval(association.getSources().get(0), new MapVariableResolverFactory(objects)); } catch (Throwable t) {
dialect.getAssignmentBuilder().build( context, assignment, dataAssociation.getSources().get(0), dataAssociation.getTarget(), ((WorkItemNode) node), true); dialect.getAssignmentBuilder().build( context, assignment, dataAssociation.getSources().get(0), dataAssociation.getTarget(), ((WorkItemNode) node), false);