Community

Problems with usage python language in jpdl.xml

reply from Huisheng Xu in jBPM - View the full discussion

Hi Andrey. If you set a process varaible named 'testvar1', then the script activity will run success. This is my test case:

 

public void testJava() {
        this.deployJpdlClasspath("jpdl/x10script/X1003PythonTest.jpdl.xml");

 

        Map map = new HashMap();
        map.put("testvar1", 10);

 

        ProcessInstance processInstance = executionService
            .startProcessInstanceByKey("X1003PythonTest", map);
        assertTrue(processInstance.isEnded());
    }

 

The content of jpdl.xml is as same as yours. But if I am not set a 'testvar1' variable, then the same Exception occured. I have checked the source of GroovyScriptEngineFactory, there were a lot of codes to evaluate the groovy snipts, I afraid that if you want to use local variable in script actviity, you should do it by yourself.

Reply to this message by going to Community

Start a new discussion in jBPM at Community