cancel
Showing results for 
Search instead for 
Did you mean: 

How to get all deployed workflows

vire7777
Champ in-the-making
Champ in-the-making
Hi all Smiley Happy

After a long search in the userguide, i really don't see how to get the deployed workflow list to launch a new process instance.

To deploy you have to :
Deployment deployment = repositoryService.createDeployment()
  .addClasspathResource(workflowFullName)
  .deploy();

To get the full deployed workflow list, you have to :
???

To launch an instance you have to :
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(workflowName);

I know this exists because in the Activiti interface, we can see the entire list of deployed workflows to launch an instance… but how… that's the question
Could someone help me ?
5 REPLIES 5

gokceng
Champ in-the-making
Champ in-the-making
List<Deployment> deployments = repositoryService.createDeploymentQuery().list();

frederikherema1
Star Contributor
Star Contributor
To get the actual processes that are deployed in the deployment, use this:


repositoryService.createProcesDefinitionQuery().deploymentId(createdDeployment.getId()).list();

vire7777
Champ in-the-making
Champ in-the-making
Well thanks a lot for your answers Smiley Happy

What do you exactly mean by "the actual processes that are deployed in the deployment" ?
I thought you had :
BpmnWorkflow —-> Deployed workflow/process —-> Process Instance

frederikherema1
Star Contributor
Star Contributor
You can deploy a Bar-file, containing multiple processes, which are deployed at the same time…

vire7777
Champ in-the-making
Champ in-the-making
Oh ok ! Sure i've seen that but don't need it for the moment Smiley Wink
Thanks anyway (maybe it could help me later)