Camunda cannot execute groovy script

孤人 提交于 2019-12-13 14:09:56

问题


Here is my dependencies.

compile group: 'org.camunda.bpm.springboot', name: 'camunda-bpm-spring-boot-starter-webapp', version: '3.0.0'

compile group: 'org.camunda.bpm.springboot', name: 'camunda-bpm-spring-boot-starter', version: '3.0.0'

compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.5.2', ext: 'pom'

Here is the error message, it seems like cannot find engine.

org.camunda.bpm.engine.exception.NullValueException: Can't find scripting engine for 'groovy': scriptEngine is null

Here is my script task xml format.

<bpmn:scriptTask id="Task_17h6w6s" name="changeStatus" scriptFormat="groovy">
      <bpmn:incoming>SequenceFlow_1mvf31j</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_19je5yh</bpmn:outgoing>
      <bpmn:script>execution.setVariable("status", APPROVED);
</bpmn:script>
    </bpmn:scriptTask>

Can someone help me ? Thanks


回答1:


I already resolved it.

Just add this dependency.

compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.15'


来源:https://stackoverflow.com/questions/52547810/camunda-cannot-execute-groovy-script

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!