Process without potential starter

I have a page where I show the authenticated users their tasks they can start. for example, when “kermit” logs in he can see the process definition he can start using this method:

List list = repositoryService.createProcessDefinitionQuery().startableByUser(“kermit”).latestVersion().list();

my question is: if in a bpmn.xml file there are not potential starters/candidates, it cannot be accessible? is it correct? should we make potential starter compulsory? is there any method to get processes without potential starters?

Depends. If you’re using the java API, it’s up to you. In other places (e.g. Task UI), it might mean that or
the opposite (i.e. show it to all). How are you using Flowable?

I am using flowable engine. so, how can I get process without candidate starters?

This would filter on the starters:

repositoryService.createProcessDefinitionQuery().startableByUser(“abc”)

This will return all processes:

repositoryService.createProcessDefinitionQuery()

However, I’m assuming that you want only those without a starter set (and not all)? That’s currently not possible, that would need to be added to the ProcessDefinitionQuery.

1 Like