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;
}
Aggregations