Skip to content

Commit f612c96

Browse files
committed
Adds entry funcs to Workflow Context
Signed-off-by: joshvanl <[email protected]>
1 parent 78b3560 commit f612c96

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

workflow/workflow.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,22 @@ func (w *WorkflowContext) GetInput(v any) error {
2828
return w.oc.GetInput(v)
2929
}
3030

31+
func (w *WorkflowContext) ID() string {
32+
return string(w.oc.ID)
33+
}
34+
35+
func (w *WorkflowContext) Name() string {
36+
return w.oc.Name
37+
}
38+
39+
func (w *WorkflowContext) CurrentTimeUTC() time.Time {
40+
return w.oc.CurrentTimeUtc
41+
}
42+
43+
func (w *WorkflowContext) IsReplaying() bool {
44+
return w.oc.IsReplaying
45+
}
46+
3147
// CallActivity schedules an asynchronous invocation of an activity function.
3248
// The [activity] parameter can be either the name of an activity as a string
3349
// or can be a pointer to the function that implements the activity, in which

0 commit comments

Comments
 (0)