public void testOutputExternalDeploymentScriptValueAsVariable() {
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("scriptPath", "deployment://org/camunda/bpm/engine/test/bpmn/iomapping/oneplusone.groovy");
ProcessInstance pi = runtimeService.startProcessInstanceByKey("testProcess", variables);
VariableInstance variable = runtimeService.createVariableInstanceQuery().variableName("var1").singleResult();
assertNotNull(variable);
assertEquals(2, variable.getValue());
assertEquals(pi.getId(), variable.getExecutionId());
}