Skip to content

Commit 6f8dec9

Browse files
authored
format header fields (#921)
1 parent b52fd9f commit 6f8dec9

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

src/utils/data-formatters/format-workflow-history-event/__tests__/index.test.ts.snapshot

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,9 @@ exports[`formatWorkflowHistoryEvent should format workflow workflowExecutionStar
722722
"firstExecutionRunId": "1d0e29d3-9c20-4eda-aeca-daed7f0ccb2e",
723723
"firstScheduledTimeNano": 1716246362895.4253,
724724
"header": {
725-
"fields": {},
725+
"fields": {
726+
"test-header": "test-header-data",
727+
},
726728
},
727729
"identity": null,
728730
"initiator": "CRON_SCHEDULE",

src/utils/data-formatters/format-workflow-history-event/format-workflow-execution-started-event.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const formatWorkflowExecutionStartedEvent = ({
3434
searchAttributes,
3535
taskList,
3636
taskStartToCloseTimeout,
37+
header,
3738
...eventAttributes
3839
},
3940
...eventFields
@@ -69,6 +70,7 @@ const formatWorkflowExecutionStartedEvent = ({
6970
: null,
7071
identity: identity || null,
7172
initiator: formatEnum(initiator, 'CONTINUE_AS_NEW_INITIATOR'),
73+
header: formatPayloadMap(header, 'fields'),
7274
memo: formatPayloadMap(memo, 'fields'),
7375
originalExecutionRunId: originalExecutionRunId || null,
7476
parentInitiatedEventId: parentExecutionInfo?.initiatedId

src/views/workflow-history/__fixtures__/workflow-history-single-events.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ export const startWorkflowExecutionEvent = {
5252
points: [],
5353
},
5454
header: {
55-
fields: {},
55+
fields: {
56+
'test-header': {
57+
data: 'dGVzdC1oZWFkZXItZGF0YQ==',
58+
},
59+
},
5660
},
5761
firstScheduledTime: {
5862
seconds: '1716246362',

0 commit comments

Comments
 (0)