How to programmatically get a list of all inactive processes?

Hi Camunda Team,
is there a way to read all processes that are deployed but not started yet?

Currently we read the “deployedList” and the “activeinstances” and than we reduce the
“deployedList” accordingly but I wonder if there is a better way?

Thanks and best regards
Roland

You could query for process definitions

Hi Niall
can you please provide some more information/code?

For example, to get the active instances, we use the runtimeservice

List processInstances =
runtimeService.createProcessInstanceQuery().active().list();

How would I ask the BPM engine for process instances that are available(deployed) but not yet started?
Thanks, Roland

If you want to get all the definitions that you could potentially start then you can sue this:

    execution.getProcessEngineServices()
    .getRepositoryService()
    .createDecisionDefinitionQuery()
    .list();

Hi Roland,

There is no single built-in query that lets you find process definitions for which there are no process instances. You could either write a custom SQL query or do a nested process instance count query for every process definition.

Cheers,
Thorben