I am trying to load an external groovy script in my BPMN and I can’t find any way to do this. It is important to mention I am running a Camunda engine from a .jar file so I can’t put my groovy script to META-INF.
- Run Camunda engine from compiled .jar
sudo java -cp "home/e/h2/bin/h2-1.4.199.jar" -jar -Dspring.profiles.active="local" camunda-compiled.jar
- Put together a BPMN file with a Script task using External script script1.groovy
- Deploy BPMN to the started engine
- After starting an instance of the process I get an error when the process comes to the Script tast defined in step number 2 saying it can’t load script1.groovy.
I have tried to put my script1.groovy to the same directory as my .bpmn process. Also I tried to specify an extra classpath
sudo java -cp "/home/e/groovy_scripts/script1.groovy;/home/e/h2/bin/h2-1.4.199.jar" -jar -Dspring.profiles.active="local" camunda-compiled.jar. Nothing has worked.
I have tried using load function as one forum topic suggested, but I had no success using it. (I put load(‘classpath:script1.groovy’) as the script task inline script as well as external task…)
Is there a way to load an external script, please?