Zeebe Fluent API - process versioning

I am using the Java client and I model the process using the Fluent API.

I noticed that for example if I have a service, in which at its start I want
to make sure that the process is deployed, a new version is declared
each time. If instead using .bpmn files it works fine. I guess it’s because
when using the Fluent API, some bpmn elements textual information
is auto generated and Zeebe perceives them as a change.

Is there some strategy I can use to have a similar versioning behavior
when deploying to Zeebe ? Even if I use the Fluent API, to have
a similar behavior like using bpmn files ?

Hi @raduone,

Can you write the model to disk yourself, then deploy from there?

You could use some kind of hash to determine if a model has actually changed from the last generation.

What elements exactly change that make using the FluentAPI non-deterministic?

I was thinking of such an approach, to do some mechanism myself.
I was just thinking if, the definition of the process, can be done, in a way
in which I would avoid any auto generation, so it can be deterministic.
But what I’ll do, is generate the BPMN files, from the Fluent API definition,
multiple times, to see what is changing. I’ll update this thread after.

Using the Fluent API, it generate a new ID of every element if it is not set. It is maybe possible to give every element an explicit ID (i.e. generated in a deterministic way) when creating the workflow with the API.

Yep, exactly my thought right now, so I’ll generate the bpmn files from the fluent definition, to see what I might have to set explicitly. But yes, indeed this might be the case.