use of org.apache.inlong.manager.common.pojo.workflow.TaskExecuteLogQuery in project incubator-inlong by apache.
the class WorkflowServiceImplTest method testListTaskExecuteLogs.
@Test
public void testListTaskExecuteLogs() {
// insert process instance
String groupId = "test_group";
WorkflowProcessEntity process = new WorkflowProcessEntity();
process.setId(1);
process.setInlongGroupId(groupId);
process.setName("CREATE_GROUP_RESOURCE");
process.setDisplayName("Group-Resource");
process.setHidden(1);
process.setStatus(ProcessStatus.COMPLETED.name());
processEntityMapper.insert(process);
// insert task instance
WorkflowTaskEntity task = new WorkflowTaskEntity();
task.setId(1);
task.setType("ServiceTask");
task.setProcessId(1);
taskEntityMapper.insert(task);
// query execute logs
TaskExecuteLogQuery query = new TaskExecuteLogQuery();
query.setInlongGroupId(groupId);
query.setProcessNames(Collections.singletonList("CREATE_GROUP_RESOURCE"));
PageInfo<WorkflowExecuteLog> logPageInfo = workflowService.listTaskExecuteLogs(query);
Assert.assertEquals(1, logPageInfo.getTotal());
}
Aggregations