Skip to content

Commit a78eb7a

Browse files
committed
Fix: Workflow Identity
1 parent 9aad7b2 commit a78eb7a

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

dbos/workflow.go

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -490,13 +490,16 @@ type Workflow[P any, R any] func(ctx DBOSContext, input P) (R, error)
490490
type WorkflowFunc func(ctx DBOSContext, input any) (any, error)
491491

492492
type workflowOptions struct {
493-
workflowName string
494-
workflowID string
495-
queueName string
496-
applicationVersion string
497-
maxRetries int
498-
deduplicationID string
499-
priority uint
493+
workflowName string
494+
workflowID string
495+
queueName string
496+
applicationVersion string
497+
maxRetries int
498+
deduplicationID string
499+
priority uint
500+
authenticated_user string
501+
assumed_role string
502+
authenticated_roles []string
500503
}
501504

502505
// WorkflowOption is a functional option for configuring workflow execution parameters.
@@ -732,6 +735,9 @@ func (c *dbosContext) RunWorkflow(_ DBOSContext, fn WorkflowFunc, input any, opt
732735
QueueName: params.queueName,
733736
DeduplicationID: params.deduplicationID,
734737
Priority: int(params.priority),
738+
AuthenticatedUser: params.authenticated_user,
739+
AssumedRole: params.assumed_role,
740+
AuthenticatedRoles: params.authenticated_roles,
735741
}
736742

737743
// Init status and record child workflow relationship in a single transaction

0 commit comments

Comments
 (0)