Skip to content

Commit bb7b4ac

Browse files
committed
Update to include new WorkflowInstance method from master
1 parent e530900 commit bb7b4ac

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/WorkflowCore/Services/WorkflowActivity.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,20 @@ internal static Activity StartPoll(string type)
3535

3636
return activity;
3737
}
38+
39+
internal static void Enrich(WorkflowInstance workflow, string action)
40+
{
41+
var activity = Activity.Current;
42+
if (activity != null)
43+
{
44+
activity.DisplayName = $"workflow {action} {workflow.WorkflowDefinitionId}";
45+
activity.SetTag("workflow.id", workflow.Id);
46+
activity.SetTag("workflow.definition", workflow.WorkflowDefinitionId);
47+
activity.SetTag("workflow.status", workflow.Status);
48+
}
49+
}
50+
51+
3852
internal static void Enrich(WorkflowStep workflowStep)
3953
{
4054
var activity = Activity.Current;

0 commit comments

Comments
 (0)