public virtual void testScriptInClasspathAsBean() { IDictionary <string, object> variables = new Dictionary <string, object>(); variables["scriptResourceBean"] = new ScriptResourceBean(); IProcessInstance processInstance = runtimeService.StartProcessInstanceByKey("process", variables); string greeting = (string)runtimeService.GetVariable(processInstance.Id, "greeting"); Assert.NotNull(greeting); Assert.AreEqual("Greetings camunda BPM speaking", greeting); }
public virtual void testSourceAsExpressionAsBean() { deployProcess(PYTHON, "#{scriptResourceBean.GetSource()}"); IDictionary <string, object> variables = new Dictionary <string, object>(); variables["scriptResourceBean"] = new ScriptResourceBean(); IProcessInstance pi = runtimeService.StartProcessInstanceByKey("testProcess", variables); string variableValue = (string)runtimeService.GetVariable(pi.Id, "foo"); Assert.AreEqual("bar", variableValue); }