I'm trying to deploy a process definition from a file using the following code
DeploymentBuilder deploymentBuilder = repositoryService.createDeployment().name(definitionName);
deploymentBuilder.addInputStream(definitionName, definitionFileInputStream);
String deploymentId = deploymentBuilder.deploy().getId();
System.out.println(deploymentId);
The above code runs successfully and the new deploymentId is printed out.
Later, I tried to list the deployed process definitions using the following code
List<ProcessDefinition> definitions = repositoryService.createProcessDefinitionQuery().list();
System.out.println(definitions.size());
The above code runs successfully but the output is always 0.
I've done some investigations and found that in the ACT_GE_BYTEARRAY
table an entry with the corresponding deploymentId
exists and the BYTES_
column contains that contents of the definitions file.
I have also found that there is no corresponding entry found in ACT_RE_PROCDEF
table.
Is there something messing? from the API and the examples I found it seems that the above code shall suffice, or is there a missing step?
Thanks for your help