public void adjustOutMapping(String forEachOutVariable) { Iterator<DataAssociation> it = outMapping.iterator(); while (it.hasNext()) { DataAssociation association = it.next(); if (forEachOutVariable.equals(association.getTarget())) { it.remove(); } } }
public void adjustOutMapping(String forEachOutVariable) { if (forEachOutVariable == null) { return; } Iterator<DataAssociation> it = outMapping.iterator(); while (it.hasNext()) { DataAssociation association = it.next(); if (forEachOutVariable.equals(association.getTarget())) { it.remove(); } } }
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; }
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; }
Object parameterValue = transformer.transform(transformation.getCompiledExpression(), objects); VariableScopeInstance variableScopeInstance = (VariableScopeInstance) resolveContextInstance(VariableScope.VARIABLE_SCOPE, association.getTarget()); if (variableScopeInstance != null && parameterValue != null) { variableScopeInstance.setVariable(association.getTarget(), parameterValue); } else { logger.warn("Could not find variable scope for variable {}", association.getTarget()); logger.warn("Continuing without setting variable."); variableScopeInstance.setVariable(association.getTarget(), parameterValue); resolveContextInstance(VariableScope.VARIABLE_SCOPE, association.getTarget()); if (variableScopeInstance != null) { Object value = objects.get(association.getSources().get(0)); Variable varDef = variableScopeInstance.getVariableScope().findVariable(association.getTarget()); DataType dataType = varDef.getType(); value = dataType.readValue((String) value); variableScopeInstance.setVariable(association.getTarget(), value); } else { logger.warn("Could not find variable scope for variable {}", association.getTarget());
Object parameterValue = transformer.transform(transformation.getCompiledExpression(), subProcessVariableScopeInstance.getVariables()); VariableScopeInstance variableScopeInstance = (VariableScopeInstance) resolveContextInstance(VariableScope.VARIABLE_SCOPE, mapping.getTarget()); if (variableScopeInstance != null && parameterValue != null) { variableScopeInstance.setVariable(mapping.getTarget(), parameterValue); } else { logger.warn("Could not find variable scope for variable {}", mapping.getTarget()); logger.warn("Continuing without setting variable."); resolveContextInstance(VariableScope.VARIABLE_SCOPE, mapping.getTarget()); if (variableScopeInstance != null) { Object value = subProcessVariableScopeInstance.getVariable(mapping.getSources().get(0)); variableScopeInstance.setVariable(mapping.getTarget(), value); } else { logger.error("Could not find variable scope for variable {}", mapping.getTarget()); logger.error("when trying to complete SubProcess node {}", getSubProcessNode().getName()); logger.error("Continuing without setting variable.");
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).getTarget()).isEqualTo("invoiceApproved"); 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);
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).getTarget()).isEqualTo("caseFile_invoice"); 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).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).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(decisionTask.getOutAssociations().get(0).getTarget()).isEqualTo("caseFile_invoice"); assertThat(caseTask.getInAssociations().get(0).getSources()).hasSize(1); assertThat(caseTask.getInAssociations().get(0).getSources().get(0)).isEqualTo("caseFile_invoice"); assertThat(caseTask.getInAssociations().get(0).getTarget()).isEqualTo("Data_origin"); assertThat(caseTask.getOutAssociations().get(0).getTarget()).isEqualTo("caseFile_invoice");