Search in sources :

Example 1 with UpdateProcessInstanceSuspensionStateSelectBuilder

use of org.camunda.bpm.engine.runtime.UpdateProcessInstanceSuspensionStateSelectBuilder in project camunda-bpm-platform by camunda.

the class ProcessInstanceSuspensionStateDto method createUpdateSuspensionStateGroupBuilder.

protected UpdateProcessInstancesSuspensionStateBuilder createUpdateSuspensionStateGroupBuilder(ProcessEngine engine) {
    UpdateProcessInstanceSuspensionStateSelectBuilder selectBuilder = engine.getRuntimeService().updateProcessInstanceSuspensionState();
    UpdateProcessInstancesSuspensionStateBuilder groupBuilder = null;
    if (processInstanceIds != null) {
        groupBuilder = selectBuilder.byProcessInstanceIds(processInstanceIds);
    }
    if (processInstanceQuery != null) {
        if (groupBuilder == null) {
            groupBuilder = selectBuilder.byProcessInstanceQuery(processInstanceQuery.toQuery(engine));
        } else {
            groupBuilder.byProcessInstanceQuery(processInstanceQuery.toQuery(engine));
        }
    }
    if (historicProcessInstanceQuery != null) {
        if (groupBuilder == null) {
            groupBuilder = selectBuilder.byHistoricProcessInstanceQuery(historicProcessInstanceQuery.toQuery(engine));
        } else {
            groupBuilder.byHistoricProcessInstanceQuery(historicProcessInstanceQuery.toQuery(engine));
        }
    }
    return groupBuilder;
}
Also used : UpdateProcessInstancesSuspensionStateBuilder(org.camunda.bpm.engine.runtime.UpdateProcessInstancesSuspensionStateBuilder) UpdateProcessInstanceSuspensionStateSelectBuilder(org.camunda.bpm.engine.runtime.UpdateProcessInstanceSuspensionStateSelectBuilder)

Aggregations

UpdateProcessInstanceSuspensionStateSelectBuilder (org.camunda.bpm.engine.runtime.UpdateProcessInstanceSuspensionStateSelectBuilder)1 UpdateProcessInstancesSuspensionStateBuilder (org.camunda.bpm.engine.runtime.UpdateProcessInstancesSuspensionStateBuilder)1