Updating workflows request struct
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
This commit is contained in:
parent
4ebe7ea400
commit
deb647c241
|
@ -61,7 +61,7 @@ func ConformanceTests(t *testing.T, props map[string]string, workflowItem workfl
|
|||
t.Run("start", func(t *testing.T) {
|
||||
testLogger.Info("Start test running...")
|
||||
req := &workflows.StartRequest{
|
||||
Parameters: 10, // Time that the activity within the workflow runs for
|
||||
Input: 10, // Time that the activity within the workflow runs for
|
||||
WorkflowName: "TestWorkflow",
|
||||
}
|
||||
req.WorkflowReference.InstanceID = "TestID"
|
||||
|
|
|
@ -9,5 +9,5 @@ type StartRequest struct {
|
|||
Options map[string]string `json:"workflow_options"`
|
||||
WorkflowReference WorkflowReference `json:"workflow_reference"`
|
||||
WorkflowName string `json:"function_name"`
|
||||
Parameters interface{} `json:"parameters"`
|
||||
Input interface{} `json:"input"`
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ func (c *TemporalWF) Start(ctx context.Context, req *workflows.StartRequest) (*w
|
|||
taskQ := req.Options["task_queue"]
|
||||
|
||||
opt := client.StartWorkflowOptions{ID: req.WorkflowReference.InstanceID, TaskQueue: taskQ}
|
||||
run, err := c.client.ExecuteWorkflow(ctx, opt, req.WorkflowName, req.Parameters)
|
||||
run, err := c.client.ExecuteWorkflow(ctx, opt, req.WorkflowName, req.Input)
|
||||
if err != nil {
|
||||
return &workflows.WorkflowReference{}, fmt.Errorf("error executing workflow: %w", err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue