Get instanceId inside the bpmn

Hi,

Is possible to get the instanceId inside the modeler ?

ex:

Let’s say that I need to pass the instanceId when my service task call some external system.

Could I for example do something like {#InstanceId} and get it (like it was a instance variable) ?

If it’s not possible what would you suggest ? Create a variable inside the instance to carry the id ?

Att, Felipe

@Felipe you should be able to do:

${execution.getProcessInstanceId()}

from: https://docs.camunda.org/javadoc/camunda-bpm-platform/7.6/org/camunda/bpm/engine/delegate/DelegateExecution.html#getProcessInstanceId()

2 Likes

Thanks @StephenOTT , this is exactly what I was looking for :slight_smile: