Hi, I am trying to pass arguments to Action field of ScheduleOptions type(Create Schedule method). I am expecting to pass args of any type of my choice, like it used to be in traditional workflow execution methods.
Actual Behavior
I am using the ScheduleWorkflowAction type to pass in the values to the Action field, where the Args field in ScheduleWorkflowAction is expecting []interface{}. I would like to know if it is intended to be this way, if it is then I would like to know if I should convert all my defined types to []interface and then pass it through.
Steps to Reproduce the Problem
Here is an Example payload that i have used
client.ScheduleOptions{ Spec: client.ScheduleSpec{ CronExpressions: []string{"* * * * *"}, }, Action: &client.ScheduleWorkflowAction{ Workflow: SampleWorkflow, TaskQueue: "", Args: workflowArgs, }, }
I am expecting workflowArgs to be of any type that I define rather than to convert it into []interface{} everytime I decide to pass arguments.
Expected Behavior
Hi, I am trying to pass arguments to Action field of ScheduleOptions type(Create Schedule method). I am expecting to pass args of any type of my choice, like it used to be in traditional workflow execution methods.
Actual Behavior
I am using the ScheduleWorkflowAction type to pass in the values to the Action field, where the Args field in ScheduleWorkflowAction is expecting []interface{}. I would like to know if it is intended to be this way, if it is then I would like to know if I should convert all my defined types to []interface and then pass it through.
Steps to Reproduce the Problem
Here is an Example payload that i have used
client.ScheduleOptions{ Spec: client.ScheduleSpec{ CronExpressions: []string{"* * * * *"}, }, Action: &client.ScheduleWorkflowAction{ Workflow: SampleWorkflow, TaskQueue: "", Args: workflowArgs, }, }
I am expecting workflowArgs to be of any type that I define rather than to convert it into []interface{} everytime I decide to pass arguments.
MethodUsed -
ScheduleClient.Create()
Reference Links
https://pkg.go.dev/go.temporal.io/sdk/internal#ScheduleWorkflowAction
Specifications