AnsweredAssumed Answered

How to get ProcessDefinitionId from a programmatic deployment?

Question asked by jwestra on Feb 22, 2016
Latest reply on Feb 22, 2016 by jwestra
Hi!

I am trying to understand versioning and process definition Ids.
I have a JUnit test case that builds a BpmnModel and deploys it twice. 

I see the process definition Id is in this format:

Process.java's "id" + ":"+ version + ":" + <strong>some other number</strong>".

In my logs (see below), the "some other number" is consistently a 4 on the initial deploy and then 13 on the second deploy.

What is last part of the process definition id?

Second, because I do not know how the processDefinitionId is formed, I have to create a new Process instance and then ask it for it's definition.  I want to avoid that and instead, simply call RuntimeService.getProcessDefinition(processDefinitionId) to get my ProcessDefinition object.

<code>
10:48:27,305 INFO  [BpmnDeployer] Processing resource dynamic-model-redeploy.bpmn
First DeploymentId is: 1
ProcessDefinitionId for first deployment is : my-process:1:4
10:48:42,265 INFO  [BpmnDeployer] Processing resource dynamic-model-redeploy.bpmn
Second DeploymentId is: 10
ProcessDefinitionId for second deployment is : my-process:2:13
<code>

Outcomes