jmix-projects / jmix-bpm-public

DEPRECATED. Use https://github.com/jmix-framework/jmix
https://www.jmix.io
0 stars 0 forks source link

Script task with groovy script cannot be executed due to "Can't find scripting engine for 'groovy'" #78

Closed artemy63 closed 2 years ago

artemy63 commented 2 years ago

TC.

  1. Add into your project BPM add-on
  2. Model simple process with one Script task
  3. For script task specify 'Script format' == 'groovy', for script body specify smth
    sum = 0
    sum++
  4. Deploy process and try to execute

ER: process finished successfully AR: Exception occured "Can't find scripting engine for 'groovy'"

The problem is actual for 1.x and 1.2 versions.

In order to fix this problem it is enough to add into BPM bpm module dependency for groovy-jsr223

    implementation 'org.codehaus.groovy:groovy-jsr223'

according to documentation https://wwv.flowable.com/open-source/docs/bpmn/ch07b-BPMN-Constructs/#script-task

konyashkina commented 2 years ago

Tested on Jmix version: 1.2.0-SNAPSHOT Jmix Studio plugin version: 1.2.SNAPSHOT3825-213 IntelliJ version: IntelliJ IDEA 2021.3 RC (Ultimate Edition)