Skip to content

Commit

Permalink
fix(Runner): provided the workflow instance spec instead of the whole…
Browse files Browse the repository at this point in the history
… resource as $workflow runtime expression argument

Signed-off-by: Jean-Baptiste Bianchi <[email protected]>
  • Loading branch information
JBBianchi committed Jul 3, 2024
1 parent e383dad commit 9bb4953
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/runner/Synapse.Runner/Services/TaskExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ protected virtual async Task<ITaskExecutor> CreateTaskExecutorAsync(TaskInstance
{
var parameters = this.Task.Arguments.Clone()!;
parameters[RuntimeExpressions.Arguments.Context] = this.Task.ContextData;
parameters[RuntimeExpressions.Arguments.Workflow] = this.Task.Workflow.Instance;
parameters[RuntimeExpressions.Arguments.Workflow] = this.Task.Workflow.Instance.Spec;
parameters[RuntimeExpressions.Arguments.Task] = this.Task.Instance;
parameters[RuntimeExpressions.Arguments.Input] = this.Task.Input;
return parameters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public virtual async Task<TaskInstance> CreateTaskAsync(TaskDefinition definitio
var filteredInput = input;
var evaluationArguments = new Dictionary<string, object>()
{
{ RuntimeExpressions.Arguments.Workflow, Instance },
{ RuntimeExpressions.Arguments.Workflow, Instance.Spec },
{ RuntimeExpressions.Arguments.Context, context }
};
if (definition.Input?.From is string fromExpression) filteredInput = (await this.Expressions.EvaluateAsync<object>(fromExpression, input, evaluationArguments, cancellationToken).ConfigureAwait(false))!;
Expand Down

0 comments on commit 9bb4953

Please sign in to comment.