Пример #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Deployment public void testDefaultExternalScriptAsBean()
        public virtual void testDefaultExternalScriptAsBean()
        {
            IDictionary <string, object> variables = new Dictionary <string, object>();

            variables["scriptResourceBean"] = new ScriptResourceBean();
            ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process", variables);

            string greeting = (string)runtimeService.getVariable(processInstance.Id, "greeting");

            assertNotNull(greeting);
            assertEquals("Greetings camunda BPM speaking", greeting);
        }
Пример #2
0
        public virtual void testSourceAsExpressionAsBean()
        {
            deployProcess(PYTHON, "#{scriptResourceBean.getSource()}");

            IDictionary <string, object> variables = new Dictionary <string, object>();

            variables["scriptResourceBean"] = new ScriptResourceBean();
            ProcessInstance pi = runtimeService.startProcessInstanceByKey("testProcess", variables);

            string variableValue = (string)runtimeService.getVariable(pi.Id, "foo");

            assertEquals("bar", variableValue);
        }