Runing camunda scripting engine as standalone

Right now we are trying to use camunda for our use case in following way:

  • deploy pure docker image
  • deploy bpmn model
  • rely purely on external tasks

In our bpmn model we use very basic groovy scripts to transform json data. We would like to have unit tests for this groovy scripts. We were able instantiate completely standalone groovy shell, extract the script from xml and run it. The problem we have now is with camunda-specific extensions to groovy environment, like spin json support.

Questions:

  1. Does anyone know how to add spin in the same way as is done by camunda internals?
  2. Can we somehow reuse camunda scripting environment? Ideally without using spring at all.

Take a look at this:

You can swap out the Nashorn engine with a groovy engine.

You will also see how spin is added into the engine. This is done the same way that camunda adds SPIN.