Camunda Run Engine (remote) and external scripts/custom POJOs

Hi all,

We’re using Camunda Platform 7 Run as a remote process engine and I have a couple of questions about doing that with custom code.

  1. If we wanted to externalize scripts (eg. Groovy, Javascript, etc.) for use in our BPMNs, how would we add these to the remote engine so that they’ll be available for execution? Is it possible to deploy them like BPMNs via the Camunda REST API? Or would we have to add to the configuration/userlib directory?

  2. If we wanted the Camunda engine to deserialize process variables as our custom POJO types, would it be as simple as packaging our models in a jar and adding that jar to configuration/userlib? Would we have to specify the class name or fully-qualified class name as a type wherever those instances would be used in a BPMN?

Thanks so much for your help with using the remote Camunda Platform 7 Run engine!

Hi @DaveyStones,

They should be copied into the resources folder and will be picked up in the deployment: Camunda Platform Run |

I think the code will be treated the same way as a database driver: Camunda Platform Run |

You should try the full qualified class names.

Hope this helps, Ingo

1 Like

Hi @Ingo_Richtsmeier,

Thanks for your responses! You’ve been a great help with my developing knowledge and experience with Camunda 7 Run!

For the groovy script files, I was wondering if it’s possible to deploy those via REST API rather than adding to the configuration/resources folder? We are running the Camunda Run engine as an image in Kubernetes, so we don’t have the unpacked resources folder available without modifying the image. If we were able to deploy the script files via the Deployment API, that might be preferable. (We have autodeployment disabled.) If we could do that, how might we reference those scripts in the bpmn elements where we’d like to call them?

Thanks again!

Hi @DaveyStones,

it looks like Script deployment is available, too: Scripting |

Hope this helps, Ingo

Hi @Ingo_Richtsmeier,

It does help, sort of. I think we could use the deployment path as specified in the resources part of the Script Source documentation to reference the file like deployment://script-file-name.groovy.

But I’m not sure how to deploy it via the Deployment API, if we wanted to organize the scripts in some kind of logical file structure. Preferably, I’d like to deploy such that the script could be referenced at deployment://scripts/sometask/script-file-name.groovy. How could we deploy the script to the remote Camunda Run instance(s) via the REST API in order to have that file structure?

Thanks again for all your help.
- Dave

Actually, we’re using an Oracle datasource, and deployments seem to be stored in the database rather than the Run kubernetes pod. So does a path really matter in that case?