Skip to content

Commit

Permalink
ac-2247 (#822)
Browse files Browse the repository at this point in the history
Signed-off-by: Lillie Dae <[email protected]>
  • Loading branch information
lillie-dae authored Jun 5, 2023
1 parent 4d143b7 commit 9439e8c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
13 changes: 0 additions & 13 deletions src/WorkflowManager/Common/Services/WorkflowService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ public async Task<string> CreateAsync(Workflow workflow)
{
Guard.Against.Null(workflow);

foreach (var task in workflow.Tasks)
{
task.Args["workflow_name"] = workflow.Name;
}

var id = await _workflowRepository.CreateAsync(workflow);
_logger.WorkflowCreated(id, workflow.Name);
return id;
Expand All @@ -76,14 +71,6 @@ public async Task<string> CreateAsync(Workflow workflow)
return null;
}

if (isUpdateToWorkflowName)
{
foreach (var task in workflow.Tasks)
{
task.Args["workflow_name"] = workflow.Name;
}
}

var result = await _workflowRepository.UpdateAsync(workflow, existingWorkflow);
_logger.WorkflowUpdated(id, workflow.Name);
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,7 @@ private async Task<bool> DispatchTask(WorkflowInstance workflowInstance, Workflo
AttachPatientMetaData(taskExec, payload.PatientDetails);
}

taskExec.TaskPluginArguments["workflow_name"] = workflow!.Workflow!.Name;
_logger.LogGeneralTaskDispatchInformation(workflowInstance.PayloadId, taskExec.TaskId, workflowInstance.Id, workflow?.Id, JsonConvert.SerializeObject(pathOutputArtifacts));
var taskDispatchEvent = EventMapper.ToTaskDispatchEvent(taskExec, workflowInstance, pathOutputArtifacts, correlationId, _storageConfiguration);
var jsonMesssage = new JsonMessage<TaskDispatchEvent>(taskDispatchEvent, MessageBrokerConfiguration.WorkflowManagerApplicationId, taskDispatchEvent.CorrelationId, Guid.NewGuid().ToString());
Expand Down

0 comments on commit 9439e8c

Please sign in to comment.