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
// API client instance with server addresshttpSettings:=settings.NewHttpSettings("http://localhost:8080/api")
apiClient:=client.NewAPIClient(httpSettings)
// create a new WorkflowBuilder instancebuilder:=workflow.NewWorkflowBuilder().
Name("my_first_workflow").
Version(1).
OwnerEmail("[email protected]").
// add a couple of custom tasksAdd(workflow.NewCustomTask("custom_task", "custom_task_1")).
Add(workflow.NewCustomTask("custom_task", "custom_task_2"))
// create new workflow managermanager:=manager.NewWorkflowManager(apiClient)
// Register the workflow with serverworkflowDef:=builder.ToWorkflowDef()
manager.RegisterWorkflow(workflowDef)
Execute Workflow
// Input can be either a map or a struct that is serializable to a JSON mapworkflowInput:=map[string]interface{}{}
startWorkflowRequest:= model.StartWorkflowRequest{
Name: workflowDef.Name,
Version: workflowDef.Version,
}
workflowId, err:=manager.StartWorkflow(startWorkflowRequest)