Search in sources :

Example 1 with ModificationBuilder

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;
}
Also used : ProcessInstanceQuery(org.camunda.bpm.engine.runtime.ProcessInstanceQuery) ModificationBuilder(org.camunda.bpm.engine.runtime.ModificationBuilder) ProcessInstanceQueryDto(org.camunda.bpm.engine.rest.dto.runtime.ProcessInstanceQueryDto)

Aggregations

ProcessInstanceQueryDto (org.camunda.bpm.engine.rest.dto.runtime.ProcessInstanceQueryDto)1 ModificationBuilder (org.camunda.bpm.engine.runtime.ModificationBuilder)1 ProcessInstanceQuery (org.camunda.bpm.engine.runtime.ProcessInstanceQuery)1