use of org.apache.inlong.manager.common.pojo.workflow.WorkflowApprover in project incubator-inlong by apache.
the class WorkflowApproverServiceImpl method list.
@Override
public List<WorkflowApprover> list(WorkflowApproverQuery query) {
List<WorkflowApproverEntity> entityList = workflowApproverMapper.selectByQuery(query);
List<WorkflowApprover> approverList = CommonBeanUtils.copyListProperties(entityList, WorkflowApprover::new);
approverList.forEach(config -> {
WorkflowProcess process = workflowEngine.processDefinitionService().getByName(config.getProcessName());
if (process != null) {
config.setProcessDisplayName(process.getDisplayName());
config.setTaskDisplayName(Optional.ofNullable(process.getTaskByName(config.getTaskName())).map(WorkflowTask::getDisplayName).orElse(null));
}
});
return approverList;
}
Aggregations