Updating workflows request struct

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
This commit is contained in:
Ryan Lettieri 2022-11-14 12:39:35 -07:00
parent 4ebe7ea400
commit deb647c241
3 changed files with 3 additions and 3 deletions

View File

@ -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"

View File

@ -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"`
}

View File

@ -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)
}