You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users need a workflow-local var that is scoped only to the current workflow when accessed via code.
Rough sketch:
A user can have var myValue workflow.LocalVar[string]
myValue.Get(ctx) returns the workflow-specific value (zero value if never set, no need for a TryGet, a user can choose to wrap in nil-able type for optional/unset if needed)
myValue.Set(ctx, value) sets the workflow-specific value
This is basically just type-safe sugar for top-level context value. See temporalio/features#571.
The text was updated successfully, but these errors were encountered:
Describe the solution you'd like
Users need a workflow-local var that is scoped only to the current workflow when accessed via code.
Rough sketch:
var myValue workflow.LocalVar[string]
myValue.Get(ctx)
returns the workflow-specific value (zero value if never set, no need for aTryGet
, a user can choose to wrap in nil-able type for optional/unset if needed)myValue.Set(ctx, value)
sets the workflow-specific valueThis is basically just type-safe sugar for top-level context value. See temporalio/features#571.
The text was updated successfully, but these errors were encountered: