Commit e6d5dc04 authored by Dmitriy Novikov's avatar Dmitriy Novikov
Browse files

Fixed getDagName method

parent 31199a2a
Pipeline #68202 failed with stages
in 59 minutes and 40 seconds
......@@ -245,6 +245,7 @@ public class WorkflowRunServiceImpl implements IWorkflowRunService {
.workflowName(workflowName)
.executionTimeStamp(workflowRun.getStartTimeStamp())
.workflowEngineExecutionDate(workflowRun.getWorkflowEngineExecutionDate())
.dagName(getDagName(workflowMetadata))
.isSystemWorkflow(workflowMetadata.isSystemWorkflow())
.build();
final WorkflowStatusType currentStatusType = workflowEngineService.getWorkflowRunStatus(rq);
......@@ -264,6 +265,13 @@ public class WorkflowRunServiceImpl implements IWorkflowRunService {
return workflowRun;
}
private String getDagName(WorkflowMetadata workflowMetadata) {
Map<String, Object> instructions = workflowMetadata.getRegistrationInstructions();
return instructions != null && instructions.get(KEY_DAG_NAME) != null
? instructions.get(KEY_DAG_NAME).toString()
: workflowMetadata.getWorkflowName();
}
private WorkflowRun buildWorkflowRun(final WorkflowEngineRequest rq,
final TriggerWorkflowResponse rs) {
return WorkflowRun.builder()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment