Camunda无法执行Groovy脚本 [英] Camunda cannot execute groovy script

查看:664
本文介绍了Camunda无法执行Groovy脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的依赖项.

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

这是我的脚本任务xml格式.

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

推荐答案

我已经解决了.

只需添加此依赖项即可.

Just add this dependency.

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

这篇关于Camunda无法执行Groovy脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆