use of org.camunda.bpm.engine.runtime.ModificationBuilder in project camunda-bpm-platform by camunda.
the class ModificationRestServiceImpl method createModificationBuilder.
private ModificationBuilder createModificationBuilder(ModificationDto dto) {
ModificationBuilder builder = getProcessEngine().getRuntimeService().createModification(dto.getProcessDefinitionId());
if (dto.getInstructions() != null && !dto.getInstructions().isEmpty()) {
dto.applyTo(builder, getProcessEngine(), objectMapper);
}
List<String> processInstanceIds = dto.getProcessInstanceIds();
builder.processInstanceIds(processInstanceIds);
ProcessInstanceQueryDto processInstanceQueryDto = dto.getProcessInstanceQuery();
if (processInstanceQueryDto != null) {
ProcessInstanceQuery processInstanceQuery = processInstanceQueryDto.toQuery(getProcessEngine());
builder.processInstanceQuery(processInstanceQuery);
}
if (dto.isSkipCustomListeners()) {
builder.skipCustomListeners();
}
if (dto.isSkipIoMappings()) {
builder.skipIoMappings();
}
return builder;
}
Aggregations