Skip to content

Commit 56bfd9c

Browse files
authored
Include metadata in tasks
1 parent 692983f commit 56bfd9c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

internal/task/activity.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ type Activity struct {
1010

1111
WorkflowInstance *core.WorkflowInstance
1212

13+
WorkflowMetadata *core.WorkflowInstanceMetadata
14+
1315
Event history.Event
1416
}

internal/task/workflow.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ type Workflow struct {
1212
// WorkflowInstance is the workflow instance that this task is for
1313
WorkflowInstance *core.WorkflowInstance
1414

15+
// TODO: Use this? Or make the span more explicit?
16+
Metadata *core.WorkflowInstanceMetadata
17+
1518
// LastSequenceID is the sequence ID of the newest event in the workflow instances's history
1619
LastSequenceID int64
1720

1821
// NewEvents are new events since the last task execution
1922
NewEvents []history.Event
2023

21-
// Backend specific data
24+
// Backend specific data, only the producer of the task should rely on this.
2225
CustomData any
2326
}

0 commit comments

Comments
 (0)