public Map<String, Binding> getInputBindings() { if (inputs == null) { return null; } Map<String,Binding> bindings = new HashMap<>(); for (Map.Entry<String, InputParameter> parameter : inputs.entrySet()) { Binding<?> binding = parameter.getValue().getBinding(); if (binding != null) { bindings.put(parameter.getKey(), binding); } } return bindings; }
InputParameterImpl inParameterImpl = new InputParameterImpl(key); parser.pushContext(key, inParameter, inParameterImpl, null); Binding< ? > singleBinding = inParameter.getBinding(); if (singleBinding!=null) { inParameterImpl.binding = parser.parseBinding(singleBinding, "binding");
w.writeStringAttributeEffektif("key", input.getKey()); InputParameter parameter = input.getValue(); if (parameter.getBinding() != null) { w.writeBinding("binding", parameter.getBinding());
public Map<String, Binding> getInputBindings() { if (inputs == null) { return null; } Map<String,Binding> bindings = new HashMap<>(); for (Map.Entry<String, InputParameter> parameter : inputs.entrySet()) { Binding<?> binding = parameter.getValue().getBinding(); if (binding != null) { bindings.put(parameter.getKey(), binding); } } return bindings; }
w.writeStringAttributeEffektif("key", input.getKey()); InputParameter parameter = input.getValue(); if (parameter.getBinding() != null) { w.writeBinding("binding", parameter.getBinding());
if (parameter.getBinding() != null || parameter.getBindings() != null) { inputs.put(key, parameter);
if (parameter.getBinding() != null || parameter.getBindings() != null) { inputs.put(key, parameter);
@Test public void testInOutParameters() { ExecutableWorkflow workflow = new ExecutableWorkflow() .activity("a", new NoneTask() .inputValue("in1", "value1") .inputExpression("in2", "expression2") .inputListBinding("in3", new Binding<Object>().value("listValue1")) .inputListBinding("in3", new Binding<Object>().expression("listExpression2")) .output("out1", "var1")); workflow = serializeWorkflow(workflow); Activity activity = workflow.getActivities().get(0); assertEquals("value1", activity.getInputs().get("in1").getBinding().getValue()); assertEquals("expression2", activity.getInputs().get("in2").getBinding().getExpression()); assertEquals("listValue1", activity.getInputs().get("in3").getBindings().get(0).getValue()); assertEquals("listExpression2", activity.getInputs().get("in3").getBindings().get(1).getExpression()); assertEquals("var1", activity.getOutputs().get("out1")); }