Rest deployment

Hi, quick question.

Can I include custom JavaDelegates in my deployment using the rest API?

If so, how should I reference them in the elements? (camunda:class=???)

Thanks in advance.

Hi @gcalvo,

first, you can deploy any file. But you can’t use this to deploy a Java class and use it in the process.

However, you can use scripting to provide the logic (i.e. code). The script can be included in the process definition (inline) or external (e.g. in deployment, classpath).

Does this help you?

Greetings,
Philipp

I not sure about the scripting.

I intend to communicate with an engine in a different machine from my app. Is there any way to load JavaDelegates remotely?

Hi @gcalvo,

no, you cannot load a JavaDelegate remotely by default.

Why do you want to update the JavaDelegate? Can you please describe your use case more detailed.

Greetings,
Philipp

Hi @Philipp_Ossler, and thanks for all your answers.

My intention is to communicate a webapp with a process engine.

I want a stablish a bidirectional communication using web services so the evaluation of conditions in a bpm-process are solved by calling an api provided by the webapp. My intention was to provide a set of JavaDelegates to implement the communication on the side of the engine, and add more if new functionalities are needed.

But maybe I’m approaching to the problem in the wrong way (I’m kind of new to bpm). Any tips on how to achieve my goal?

Hi @gcalvo,

you may not need one JavaDelegate for each API call. You can also use a generic JavaDelegate for all calls and pass different arguments. Or you can use the Camunda HTTP connector.

In both cases you can extend your process without providing new JavaDelegates.

Greetings,
Philipp

Ok, thanks a lot. I think that is exactly what I need.