How the process instance became a variable

I have a question, how do i get the instance id when i started this process. so the value of the instanceId is the processInstancceid of the process that i’ve been started

Hello my friend!

To get the string referring to the process instance ID of your current instance, you can use the following code:

execution.getProcessInstanceId();

So for example, you can save this in a variable and use it however you want:

var processInstanceId = execution.getProcessInstanceId();

I hope this helps!

William Robert Alves