Search in sources :

Example 1 with TaskForm

use of org.apache.inlong.manager.common.pojo.workflow.form.TaskForm in project incubator-inlong by apache.

the class WorkflowContextBuilderImpl method buildContextForTask.

@SneakyThrows
@Override
public WorkflowContext buildContextForTask(Integer taskId, WorkflowAction action) {
    WorkflowTaskEntity taskEntity = taskEntityMapper.selectById(taskId);
    WorkflowProcess process = definitionRepository.get(taskEntity.getProcessName()).clone();
    TaskForm taskForm = WorkflowFormParserUtils.parseTaskForm(taskEntity, process);
    List<String> transferToUsers = getTransferToUsers(taskEntity.getExtParams());
    return buildContextForTask(taskId, action, taskForm, transferToUsers, taskEntity.getRemark(), taskEntity.getOperator());
}
Also used : TaskForm(org.apache.inlong.manager.common.pojo.workflow.form.TaskForm) WorkflowTaskEntity(org.apache.inlong.manager.dao.entity.WorkflowTaskEntity) WorkflowProcess(org.apache.inlong.manager.workflow.definition.WorkflowProcess) SneakyThrows(lombok.SneakyThrows)

Aggregations

SneakyThrows (lombok.SneakyThrows)1 TaskForm (org.apache.inlong.manager.common.pojo.workflow.form.TaskForm)1 WorkflowTaskEntity (org.apache.inlong.manager.dao.entity.WorkflowTaskEntity)1 WorkflowProcess (org.apache.inlong.manager.workflow.definition.WorkflowProcess)1