EXECUTION LISTENER USING STANDALONE CAMUNDA SERVER

Hi team,
I am trying to do an execution listener using an external groovy file,
i have done it using inline script, but to my more obvious and easy to refactor in the future i want to put it in external file. the is that i am using standalone CAMUNDA server.
thanks

Hello my friend!

I’ve never used standalone, but I’ll try to help…
I believe you can create your script file, and save it in some folder, and then add the folder path of your scripts to the Classpath and then restart the server.

This will make your application recognize the path where your scripts are stored, and be able to execute them.

William Robert Alves

2 Likes

Hi @gad,

1- Set Resource property to deployment://script.js

2- When deploying your bpmn file, include your script file as in below snip so all deployed in the same deployment

Notice: Replace script.js with your script file name.

2 Likes

Resource can be contained in either deployment or classpath.

The example provided above demonstrates how to incorporate it into the deployment.
The answer given by @WilliamR.Alves illustrates how to include it in the classpath.

2 Likes

thanks for your help, it works fine for me
the struggle i face now is trying to deploy the file from yaml file not from modular,
camunda.autoDeploy.bpmnResources: ‘classpath*:/process/bpmn//.bpmn’
camunda.autoDeploy.dmnResources: 'classpath
:/process/dmn/
/.dmn’
camunda.autoDeploy.formResources: 'classpath
:/process/form/**/*.form’

this is how we deploy other files, do you have any idea how to add the groovy file using same idea

thanks in advance