"application context" for StandaloneProcessingEngine

Background

  • Camunda 7.14
  • JRE 15

Question

Is there a way to attach an arbitrary pointer/context to a ProcessEngine instance running as a Standalone instance integrated with my app as a lib such that I can retrieve it from a DelegateExecution? I have an object representing my application config/state that:

  1. I need when a DelegateExecution is invoked
  2. I have when I setup the Camunda environment.

I was looking at the various options in the Context object, but it was unclear to me which, if any, of the options were appropriate for me. Guidance appreciated.

-Greg

Why do you want to accomplish this via camunda? I don’t know how you create your application but if it’s created using spring you can e.g. use the usual spring properties / configuration feature.

I’m building a clojure application similar to this: https://github.com/tobiasbehr/camunda-clojure-examples/blob/master/simple-process/src/simple_process/core.clj

The problem I am facing can be described like this:

Say my application has state which consists of a reference to the camunda engine, and a kafka client. Certain JavaDelegate operations may need to send Kafka events. So what im trying to do is initialize my system such that whenever Camunda fires a JavaDelegate::execute() call, I can acquire my app state somehow so that I may access the Kafka context.

I don’t know how it can be done with Clojure, but Spring does exactly that for Java. Just use delegate expressions. Can Spring be used with Clojure?