diff --git a/Conductor/Api/IWorkflowResourceApi.cs b/Conductor/Api/IWorkflowResourceApi.cs new file mode 100644 index 00000000..9fb1468e --- /dev/null +++ b/Conductor/Api/IWorkflowResourceApi.cs @@ -0,0 +1,677 @@ +using System; +using System.Collections.Generic; +using Conductor.Client; +using Conductor.Client.Models; + +namespace Conductor.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IWorkflowResourceApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Starts the decision task for a workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void Decide(string workflowId); + + /// + /// Starts the decision task for a workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + ApiResponse DecideWithHttpInfo(string workflowId); + /// + /// Removes the workflow from the system + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// + void Delete(string workflowId, bool? archiveWorkflow = null); + + /// + /// Removes the workflow from the system + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// ApiResponse of Object(void) + ApiResponse DeleteWithHttpInfo(string workflowId, bool? archiveWorkflow = null); + /// + /// Execute a workflow synchronously + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (optional) + /// WorkflowRun + WorkflowRun ExecuteWorkflow(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null); + + /// + /// Update the value of the workflow variables for the given workflow id + /// + /// + /// ApiResponse of Object(void) + Object UpdateWorkflowVariables(Workflow workflow); + /// + /// Execute a workflow synchronously + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + /// (optional) + /// ApiResponse of WorkflowRun + ApiResponse ExecuteWorkflowWithHttpInfo(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null); + /// + /// Gets the workflow by workflow id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// (optional, default to false) + /// Workflow + Workflow GetExecutionStatus(string workflowId, bool? includeTasks = null, bool? summarize = null); + + /// + /// Gets the workflow by workflow id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to true) + /// (optional, default to false) + /// ApiResponse of Workflow + ApiResponse GetExecutionStatusWithHttpInfo(string workflowId, bool? includeTasks = null, bool? summarize = null); + /// + /// Gets the workflow tasks by workflow id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to 0) + /// (optional, default to 15) + /// (optional) + /// TaskListSearchResultSummary + TaskListSearchResultSummary GetExecutionStatusTaskList(string workflowId, int? start = null, int? count = null, string status = null); + + /// + /// Gets the workflow tasks by workflow id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to 0) + /// (optional, default to 15) + /// (optional) + /// ApiResponse of TaskListSearchResultSummary + ApiResponse GetExecutionStatusTaskListWithHttpInfo(string workflowId, int? start = null, int? count = null, string status = null); + /// + /// Get the uri and path of the external storage where the workflow payload is to be stored + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ExternalStorageLocation + ExternalStorageLocation GetExternalStorageLocation(string path, string operation, string payloadType); + + /// + /// Get the uri and path of the external storage where the workflow payload is to be stored + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of ExternalStorageLocation + ApiResponse GetExternalStorageLocationWithHttpInfo(string path, string operation, string payloadType); + /// + /// Retrieve all the running workflows + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to 1) + /// (optional) + /// (optional) + /// List<string> + List GetRunningWorkflow(string name, int? version = null, long? startTime = null, long? endTime = null); + + /// + /// Retrieve all the running workflows + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to 1) + /// (optional) + /// (optional) + /// ApiResponse of List<string> + ApiResponse> GetRunningWorkflowWithHttpInfo(string name, int? version = null, long? startTime = null, long? endTime = null); + /// + /// Gets the workflow by workflow id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// (optional, default to false) + /// WorkflowStatus + WorkflowStatus GetWorkflowStatusSummary(string workflowId, bool? includeOutput = null, bool? includeVariables = null); + + /// + /// Gets the workflow by workflow id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// (optional, default to false) + /// ApiResponse of WorkflowStatus + ApiResponse GetWorkflowStatusSummaryWithHttpInfo(string workflowId, bool? includeOutput = null, bool? includeVariables = null); + /// + /// Lists workflows for the given correlation id list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional, default to false) + /// (optional, default to false) + /// Dictionary<string, List<Workflow>> + Dictionary> GetWorkflows(List correlationIds, string name, bool? includeClosed = null, bool? includeTasks = null); + + /// + /// Lists workflows for the given correlation id list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional, default to false) + /// (optional, default to false) + /// ApiResponse of Dictionary<string, List<Workflow>> + ApiResponse>> GetWorkflowsWithHttpInfo(List correlationIds, string name, bool? includeClosed = null, bool? includeTasks = null); + /// + /// Lists workflows for the given correlation id list and workflow name list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// (optional, default to false) + /// Dictionary<string, List<Workflow>> + Dictionary> GetWorkflows(CorrelationIdsSearchRequest request, bool? includeClosed = null, bool? includeTasks = null); + + /// + /// Lists workflows for the given correlation id list and workflow name list + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// (optional, default to false) + /// ApiResponse of Dictionary<string, List<Workflow>> + ApiResponse>> GetWorkflowsWithHttpInfo(CorrelationIdsSearchRequest request, bool? includeClosed = null, bool? includeTasks = null); + /// + /// Lists workflows for the given correlation id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional, default to false) + /// (optional, default to false) + /// List<Workflow> + List GetWorkflows(string name, string correlationId, bool? includeClosed = null, bool? includeTasks = null); + + /// + /// Lists workflows for the given correlation id + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional, default to false) + /// (optional, default to false) + /// ApiResponse of List<Workflow> + ApiResponse> GetWorkflowsWithHttpInfo(string name, string correlationId, bool? includeClosed = null, bool? includeTasks = null); + /// + /// Pauses the workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void PauseWorkflow(string workflowId); + + /// + /// Pauses the workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + ApiResponse PauseWorkflowWithHttpInfo(string workflowId); + + /// + /// Reruns the workflow from a specific task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// string + string Rerun(RerunWorkflowRequest request, string workflowId); + + /// + /// Reruns the workflow from a specific task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// ApiResponse of string + ApiResponse RerunWithHttpInfo(RerunWorkflowRequest request, string workflowId); + /// + /// Resets callback times of all non-terminal SIMPLE tasks to 0 + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void ResetWorkflow(string workflowId); + + /// + /// Resets callback times of all non-terminal SIMPLE tasks to 0 + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + ApiResponse ResetWorkflowWithHttpInfo(string workflowId); + /// + /// Restarts a completed workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// + void Restart(string workflowId, bool? useLatestDefinitions = null); + + /// + /// Restarts a completed workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// ApiResponse of Object(void) + ApiResponse RestartWithHttpInfo(string workflowId, bool? useLatestDefinitions = null); + /// + /// Resumes the workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + void ResumeWorkflow(string workflowId); + + /// + /// Resumes the workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + ApiResponse ResumeWorkflowWithHttpInfo(string workflowId); + /// + /// Retries the last failed task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// + void Retry(string workflowId, bool? resumeSubworkflowTasks = null); + + /// + /// Retries the last failed task + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional, default to false) + /// ApiResponse of Object(void) + ApiResponse RetryWithHttpInfo(string workflowId, bool? resumeSubworkflowTasks = null); + /// + /// Search for workflows based on payload and other parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// (optional, default to false) + /// ScrollableSearchResultWorkflowSummary + ScrollableSearchResultWorkflowSummary Search(string queryId = null, int? start = null, int? size = null, string sort = null, string freeText = null, string query = null, bool? skipCache = null); + + /// + /// Search for workflows based on payload and other parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// (optional, default to false) + /// ApiResponse of ScrollableSearchResultWorkflowSummary + ApiResponse SearchWithHttpInfo(string queryId = null, int? start = null, int? size = null, string sort = null, string freeText = null, string query = null, bool? skipCache = null); + /// + /// Search for workflows based on payload and other parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultWorkflow + SearchResultWorkflow SearchV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + + /// + /// Search for workflows based on payload and other parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// ApiResponse of SearchResultWorkflow + ApiResponse SearchV2WithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + /// + /// Search for workflows based on task parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultWorkflowSummary + SearchResultWorkflowSummary SearchWorkflowsByTasks(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + + /// + /// Search for workflows based on task parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// ApiResponse of SearchResultWorkflowSummary + ApiResponse SearchWorkflowsByTasksWithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + /// + /// Search for workflows based on task parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// SearchResultWorkflow + SearchResultWorkflow SearchWorkflowsByTasksV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + + /// + /// Search for workflows based on task parameters + /// + /// + /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC + /// + /// Thrown when fails to make API call + /// (optional, default to 0) + /// (optional, default to 100) + /// (optional) + /// (optional, default to *) + /// (optional) + /// ApiResponse of SearchResultWorkflow + ApiResponse SearchWorkflowsByTasksV2WithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); + /// + /// Skips a given task from a current running workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// + void SkipTaskFromWorkflow(string workflowId, string taskReferenceName, SkipTaskRequest skipTaskRequest); + + /// + /// Skips a given task from a current running workflow + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// + /// ApiResponse of Object(void) + ApiResponse SkipTaskFromWorkflowWithHttpInfo(string workflowId, string taskReferenceName, SkipTaskRequest skipTaskRequest); + /// + /// Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// string + string StartWorkflow(StartWorkflowRequest request); + + /// + /// Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of string + ApiResponse StartWorkflowWithHttpInfo(StartWorkflowRequest request); + /// + /// Start a new workflow. Returns the ID of the workflow instance that can be later used for tracking + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// (optional, default to 0) + /// string + string StartWorkflow(string name, Dictionary input, int? version = null, string correlationId = null, int? priority = null); + + /// + /// Start a new workflow. Returns the ID of the workflow instance that can be later used for tracking + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// + /// (optional) + /// (optional) + /// (optional, default to 0) + /// ApiResponse of string + ApiResponse StartWorkflowWithHttpInfo(string name, Dictionary input, int? version = null, string correlationId = null, int? priority = null); + /// + /// Terminate workflow execution + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional, default to false) + /// + void Terminate(string workflowId, string reason = null, bool? triggerFailureWorkflow = null); + + /// + /// Terminate workflow execution + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional, default to false) + /// ApiResponse of Object(void) + ApiResponse TerminateWithHttpInfo(string workflowId, string reason = null, bool? triggerFailureWorkflow = null); + /// + /// Test workflow execution using mock data + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// Workflow + Workflow TestWorkflow(WorkflowTestRequest request); + + /// + /// Test workflow execution using mock data + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Workflow + ApiResponse TestWorkflowWithHttpInfo(WorkflowTestRequest request); + #endregion Synchronous Operations + } +} \ No newline at end of file diff --git a/Conductor/Api/WorkflowResourceApi.cs b/Conductor/Api/WorkflowResourceApi.cs index 409632af..2cc166d9 100644 --- a/Conductor/Api/WorkflowResourceApi.cs +++ b/Conductor/Api/WorkflowResourceApi.cs @@ -7,720 +7,6 @@ namespace Conductor.Api { - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IWorkflowResourceApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Starts the decision task for a workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - void Decide(string workflowId); - - /// - /// Starts the decision task for a workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse DecideWithHttpInfo(string workflowId); - /// - /// Removes the workflow from the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// - void Delete(string workflowId, bool? archiveWorkflow = null); - - /// - /// Removes the workflow from the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// ApiResponse of Object(void) - ApiResponse DeleteWithHttpInfo(string workflowId, bool? archiveWorkflow = null); - /// - /// Execute a workflow synchronously - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// (optional) - /// WorkflowRun - WorkflowRun ExecuteWorkflow(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null); - - /// - /// Update the value of the workflow variables for the given workflow id - /// - /// - /// ApiResponse of Object(void) - Object UpdateWorkflowVariables(Workflow workflow); - /// - /// Execute a workflow synchronously - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// (optional) - /// ApiResponse of WorkflowRun - ApiResponse ExecuteWorkflowWithHttpInfo(StartWorkflowRequest body, string requestId, string name, int? version, string waitUntilTaskRef = null); - /// - /// Gets the workflow by workflow id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// (optional, default to false) - /// Workflow - Workflow GetExecutionStatus(string workflowId, bool? includeTasks = null, bool? summarize = null); - - /// - /// Gets the workflow by workflow id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to true) - /// (optional, default to false) - /// ApiResponse of Workflow - ApiResponse GetExecutionStatusWithHttpInfo(string workflowId, bool? includeTasks = null, bool? summarize = null); - /// - /// Gets the workflow tasks by workflow id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to 0) - /// (optional, default to 15) - /// (optional) - /// TaskListSearchResultSummary - TaskListSearchResultSummary GetExecutionStatusTaskList(string workflowId, int? start = null, int? count = null, string status = null); - - /// - /// Gets the workflow tasks by workflow id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to 0) - /// (optional, default to 15) - /// (optional) - /// ApiResponse of TaskListSearchResultSummary - ApiResponse GetExecutionStatusTaskListWithHttpInfo(string workflowId, int? start = null, int? count = null, string status = null); - /// - /// Get the uri and path of the external storage where the workflow payload is to be stored - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ExternalStorageLocation - ExternalStorageLocation GetExternalStorageLocation(string path, string operation, string payloadType); - - /// - /// Get the uri and path of the external storage where the workflow payload is to be stored - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of ExternalStorageLocation - ApiResponse GetExternalStorageLocationWithHttpInfo(string path, string operation, string payloadType); - /// - /// Retrieve all the running workflows - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to 1) - /// (optional) - /// (optional) - /// List<string> - List GetRunningWorkflow(string name, int? version = null, long? startTime = null, long? endTime = null); - - /// - /// Retrieve all the running workflows - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to 1) - /// (optional) - /// (optional) - /// ApiResponse of List<string> - ApiResponse> GetRunningWorkflowWithHttpInfo(string name, int? version = null, long? startTime = null, long? endTime = null); - /// - /// Gets the workflow by workflow id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// (optional, default to false) - /// WorkflowStatus - WorkflowStatus GetWorkflowStatusSummary(string workflowId, bool? includeOutput = null, bool? includeVariables = null); - - /// - /// Gets the workflow by workflow id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// (optional, default to false) - /// ApiResponse of WorkflowStatus - ApiResponse GetWorkflowStatusSummaryWithHttpInfo(string workflowId, bool? includeOutput = null, bool? includeVariables = null); - /// - /// Lists workflows for the given correlation id list - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// (optional, default to false) - /// (optional, default to false) - /// Dictionary<string, List<Workflow>> - Dictionary> GetWorkflows(List body, string name, bool? includeClosed = null, bool? includeTasks = null); - - /// - /// Lists workflows for the given correlation id list - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// (optional, default to false) - /// (optional, default to false) - /// ApiResponse of Dictionary<string, List<Workflow>> - ApiResponse>> GetWorkflowsWithHttpInfo(List body, string name, bool? includeClosed = null, bool? includeTasks = null); - /// - /// Lists workflows for the given correlation id list and workflow name list - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// (optional, default to false) - /// Dictionary<string, List<Workflow>> - Dictionary> GetWorkflows(CorrelationIdsSearchRequest body, bool? includeClosed = null, bool? includeTasks = null); - - /// - /// Lists workflows for the given correlation id list and workflow name list - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// (optional, default to false) - /// ApiResponse of Dictionary<string, List<Workflow>> - ApiResponse>> GetWorkflowsWithHttpInfo(CorrelationIdsSearchRequest body, bool? includeClosed = null, bool? includeTasks = null); - /// - /// Lists workflows for the given correlation id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// (optional, default to false) - /// (optional, default to false) - /// List<Workflow> - List GetWorkflows(string name, string correlationId, bool? includeClosed = null, bool? includeTasks = null); - - /// - /// Lists workflows for the given correlation id - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// (optional, default to false) - /// (optional, default to false) - /// ApiResponse of List<Workflow> - ApiResponse> GetWorkflowsWithHttpInfo(string name, string correlationId, bool? includeClosed = null, bool? includeTasks = null); - /// - /// Pauses the workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - void PauseWorkflow(string workflowId); - - /// - /// Pauses the workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse PauseWorkflowWithHttpInfo(string workflowId); - /// - /// Jump workflow execution to given task - /// - /// - /// Jump workflow execution to given task. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// - void JumpToTask(string workflowId, Dictionary input, string taskReferenceName = null); - - /// - /// Jump workflow execution to given task - /// - /// - /// Jump workflow execution to given task. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// ApiResponse of Object(void) - ApiResponse JumpToTaskWithHttpInfo(Dictionary body, string workflowId, string taskReferenceName = null); - - /// - /// Reruns the workflow from a specific task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// string - string Rerun(RerunWorkflowRequest body, string workflowId); - - /// - /// Reruns the workflow from a specific task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of string - ApiResponse RerunWithHttpInfo(RerunWorkflowRequest body, string workflowId); - /// - /// Resets callback times of all non-terminal SIMPLE tasks to 0 - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - void ResetWorkflow(string workflowId); - - /// - /// Resets callback times of all non-terminal SIMPLE tasks to 0 - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse ResetWorkflowWithHttpInfo(string workflowId); - /// - /// Restarts a completed workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// - void Restart(string workflowId, bool? useLatestDefinitions = null); - - /// - /// Restarts a completed workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// ApiResponse of Object(void) - ApiResponse RestartWithHttpInfo(string workflowId, bool? useLatestDefinitions = null); - /// - /// Resumes the workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - void ResumeWorkflow(string workflowId); - - /// - /// Resumes the workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse ResumeWorkflowWithHttpInfo(string workflowId); - /// - /// Retries the last failed task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// - void Retry(string workflowId, bool? resumeSubworkflowTasks = null); - - /// - /// Retries the last failed task - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional, default to false) - /// ApiResponse of Object(void) - ApiResponse RetryWithHttpInfo(string workflowId, bool? resumeSubworkflowTasks = null); - /// - /// Search for workflows based on payload and other parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// (optional, default to false) - /// ScrollableSearchResultWorkflowSummary - ScrollableSearchResultWorkflowSummary Search(string queryId = null, int? start = null, int? size = null, string sort = null, string freeText = null, string query = null, bool? skipCache = null); - - /// - /// Search for workflows based on payload and other parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// (optional, default to false) - /// ApiResponse of ScrollableSearchResultWorkflowSummary - ApiResponse SearchWithHttpInfo(string queryId = null, int? start = null, int? size = null, string sort = null, string freeText = null, string query = null, bool? skipCache = null); - /// - /// Search for workflows based on payload and other parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// SearchResultWorkflow - SearchResultWorkflow SearchV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - - /// - /// Search for workflows based on payload and other parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// ApiResponse of SearchResultWorkflow - ApiResponse SearchV2WithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - /// - /// Search for workflows based on task parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// SearchResultWorkflowSummary - SearchResultWorkflowSummary SearchWorkflowsByTasks(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - - /// - /// Search for workflows based on task parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// ApiResponse of SearchResultWorkflowSummary - ApiResponse SearchWorkflowsByTasksWithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - /// - /// Search for workflows based on task parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// SearchResultWorkflow - SearchResultWorkflow SearchWorkflowsByTasksV2(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - - /// - /// Search for workflows based on task parameters - /// - /// - /// use sort options as sort=<field>:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC - /// - /// Thrown when fails to make API call - /// (optional, default to 0) - /// (optional, default to 100) - /// (optional) - /// (optional, default to *) - /// (optional) - /// ApiResponse of SearchResultWorkflow - ApiResponse SearchWorkflowsByTasksV2WithHttpInfo(int? start = null, int? size = null, string sort = null, string freeText = null, string query = null); - /// - /// Skips a given task from a current running workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - void SkipTaskFromWorkflow(string workflowId, string taskReferenceName, SkipTaskRequest skipTaskRequest); - - /// - /// Skips a given task from a current running workflow - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - /// ApiResponse of Object(void) - ApiResponse SkipTaskFromWorkflowWithHttpInfo(string workflowId, string taskReferenceName, SkipTaskRequest skipTaskRequest); - /// - /// Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// string - string StartWorkflow(StartWorkflowRequest body); - - /// - /// Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of string - ApiResponse StartWorkflowWithHttpInfo(StartWorkflowRequest body); - /// - /// Start a new workflow. Returns the ID of the workflow instance that can be later used for tracking - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// (optional, default to 0) - /// string - string StartWorkflow(string name, Dictionary body, int? version = null, string correlationId = null, int? priority = null); - - /// - /// Start a new workflow. Returns the ID of the workflow instance that can be later used for tracking - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// (optional) - /// (optional, default to 0) - /// ApiResponse of string - ApiResponse StartWorkflowWithHttpInfo(string name, Dictionary body, int? version = null, string correlationId = null, int? priority = null); - /// - /// Terminate workflow execution - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional, default to false) - /// - void Terminate(string workflowId, string reason = null, bool? triggerFailureWorkflow = null); - - /// - /// Terminate workflow execution - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional, default to false) - /// ApiResponse of Object(void) - ApiResponse TerminateWithHttpInfo(string workflowId, string reason = null, bool? triggerFailureWorkflow = null); - /// - /// Test workflow execution using mock data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Workflow - Workflow TestWorkflow(WorkflowTestRequest body); - - /// - /// Test workflow execution using mock data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Workflow - ApiResponse TestWorkflowWithHttpInfo(WorkflowTestRequest body); - /// - /// Force upload all completed workflows to document store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Object - Object UploadCompletedWorkflows(); - - /// - /// Force upload all completed workflows to document store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Object - ApiResponse UploadCompletedWorkflowsWithHttpInfo(); - #endregion Synchronous Operations - } - /// /// Represents a collection of functions to interact with the API endpoints /// @@ -1498,14 +784,14 @@ public ApiResponse GetWorkflowStatusSummaryWithHttpInfo(string w /// Lists workflows for the given correlation id list /// /// Thrown when fails to make API call - /// + /// /// /// (optional, default to false) /// (optional, default to false) /// Dictionary<string, List<Workflow>> - public Dictionary> GetWorkflows(List body, string name, bool? includeClosed = null, bool? includeTasks = null) + public Dictionary> GetWorkflows(List correlationIds, string name, bool? includeClosed = null, bool? includeTasks = null) { - ApiResponse>> localVarResponse = GetWorkflowsWithHttpInfo(body, name, includeClosed, includeTasks); + ApiResponse>> localVarResponse = GetWorkflowsWithHttpInfo(correlationIds, name, includeClosed, includeTasks); return localVarResponse.Data; } @@ -1513,15 +799,15 @@ public Dictionary> GetWorkflows(List body, string /// Lists workflows for the given correlation id list /// /// Thrown when fails to make API call - /// + /// /// /// (optional, default to false) /// (optional, default to false) /// ApiResponse of Dictionary<string, List<Workflow>> - public ApiResponse>> GetWorkflowsWithHttpInfo(List body, string name, bool? includeClosed = null, bool? includeTasks = null) + public ApiResponse>> GetWorkflowsWithHttpInfo(List correlationIds, string name, bool? includeClosed = null, bool? includeTasks = null) { // verify the required parameter 'body' is set - if (body == null) + if (correlationIds == null) throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->GetWorkflows"); // verify the required parameter 'name' is set if (name == null) @@ -1552,13 +838,13 @@ public ApiResponse>> GetWorkflowsWithHttpInfo( if (name != null) localVarPathParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // path parameter if (includeClosed != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "includeClosed", includeClosed)); // query parameter if (includeTasks != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "includeTasks", includeTasks)); // query parameter - if (body != null && body.GetType() != typeof(byte[])) + if (correlationIds != null && correlationIds.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(correlationIds); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = correlationIds; // byte array } // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) @@ -1588,13 +874,13 @@ public ApiResponse>> GetWorkflowsWithHttpInfo( /// Lists workflows for the given correlation id list and workflow name list /// /// Thrown when fails to make API call - /// + /// /// (optional, default to false) /// (optional, default to false) /// Dictionary<string, List<Workflow>> - public Dictionary> GetWorkflows(CorrelationIdsSearchRequest body, bool? includeClosed = null, bool? includeTasks = null) + public Dictionary> GetWorkflows(CorrelationIdsSearchRequest request, bool? includeClosed = null, bool? includeTasks = null) { - ApiResponse>> localVarResponse = GetWorkflowsWithHttpInfo(body, includeClosed, includeTasks); + ApiResponse>> localVarResponse = GetWorkflowsWithHttpInfo(request, includeClosed, includeTasks); return localVarResponse.Data; } @@ -1602,14 +888,14 @@ public Dictionary> GetWorkflows(CorrelationIdsSearchReque /// Lists workflows for the given correlation id list and workflow name list /// /// Thrown when fails to make API call - /// + /// /// (optional, default to false) /// (optional, default to false) /// ApiResponse of Dictionary<string, List<Workflow>> - public ApiResponse>> GetWorkflowsWithHttpInfo(CorrelationIdsSearchRequest body, bool? includeClosed = null, bool? includeTasks = null) + public ApiResponse>> GetWorkflowsWithHttpInfo(CorrelationIdsSearchRequest request, bool? includeClosed = null, bool? includeTasks = null) { // verify the required parameter 'body' is set - if (body == null) + if (request == null) throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->GetWorkflows"); var localVarPath = "/workflow/correlated/batch"; @@ -1636,13 +922,13 @@ public ApiResponse>> GetWorkflowsWithHttpInfo( if (includeClosed != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "includeClosed", includeClosed)); // query parameter if (includeTasks != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "includeTasks", includeTasks)); // query parameter - if (body != null && body.GetType() != typeof(byte[])) + if (request != null && request.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(request); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = request; // byte array } // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) @@ -1819,103 +1105,19 @@ public ApiResponse PauseWorkflowWithHttpInfo(string workflowId) } - /// - /// Jump workflow execution to given task Jump workflow execution to given task. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// - public void JumpToTask(string workflowId, Dictionary input, string taskReferenceName = null) - { - JumpToTaskWithHttpInfo(input, workflowId, taskReferenceName); - } - - - /// - /// Jump workflow execution to given task Jump workflow execution to given task. - /// - /// Thrown when fails to make API call - /// - /// - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse JumpToTaskWithHttpInfo(Dictionary body, string workflowId, string taskReferenceName = null) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'input' when calling WorkflowResourceApi->JumpToTask"); - // verify the required parameter 'workflowId' is set - if (workflowId == null) - throw new ApiException(400, "Missing required parameter 'workflowId' when calling WorkflowResourceApi->JumpToTask"); - - var localVarPath = "/workflow/{workflowId}/jump/{taskReferenceName}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - if (taskReferenceName != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "taskReferenceName", taskReferenceName)); // query parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["X-Authorization"] = this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("JumpToTask", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } + /// /// Reruns the workflow from a specific task /// /// Thrown when fails to make API call - /// + /// /// /// string - public string Rerun(RerunWorkflowRequest body, string workflowId) + public string Rerun(RerunWorkflowRequest request, string workflowId) { - ApiResponse localVarResponse = RerunWithHttpInfo(body, workflowId); + ApiResponse localVarResponse = RerunWithHttpInfo(request, workflowId); return localVarResponse.Data; } @@ -1923,13 +1125,13 @@ public string Rerun(RerunWorkflowRequest body, string workflowId) /// Reruns the workflow from a specific task /// /// Thrown when fails to make API call - /// + /// /// /// ApiResponse of string - public ApiResponse RerunWithHttpInfo(RerunWorkflowRequest body, string workflowId) + public ApiResponse RerunWithHttpInfo(RerunWorkflowRequest request, string workflowId) { // verify the required parameter 'body' is set - if (body == null) + if (request == null) throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->Rerun"); // verify the required parameter 'workflowId' is set if (workflowId == null) @@ -1958,13 +1160,13 @@ public ApiResponse RerunWithHttpInfo(RerunWorkflowRequest body, string w localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (workflowId != null) localVarPathParams.Add("workflowId", this.Configuration.ApiClient.ParameterToString(workflowId)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) + if (request != null && request.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(request); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = request; // byte array } // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) @@ -2674,11 +1876,11 @@ public ApiResponse SkipTaskFromWorkflowWithHttpInfo(string workflowId, s /// Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain /// /// Thrown when fails to make API call - /// + /// /// string - public string StartWorkflow(StartWorkflowRequest body) + public string StartWorkflow(StartWorkflowRequest request) { - ApiResponse localVarResponse = StartWorkflowWithHttpInfo(body); + ApiResponse localVarResponse = StartWorkflowWithHttpInfo(request); return localVarResponse.Data; } @@ -2686,12 +1888,12 @@ public string StartWorkflow(StartWorkflowRequest body) /// Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain /// /// Thrown when fails to make API call - /// + /// /// ApiResponse of string - public ApiResponse StartWorkflowWithHttpInfo(StartWorkflowRequest body) + public ApiResponse StartWorkflowWithHttpInfo(StartWorkflowRequest request) { // verify the required parameter 'body' is set - if (body == null) + if (request == null) throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->StartWorkflow"); var localVarPath = "/workflow"; @@ -2716,13 +1918,13 @@ public ApiResponse StartWorkflowWithHttpInfo(StartWorkflowRequest body) if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (request != null && request.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(request); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = request; // byte array } // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) @@ -2752,15 +1954,15 @@ public ApiResponse StartWorkflowWithHttpInfo(StartWorkflowRequest body) /// Start a new workflow. Returns the ID of the workflow instance that can be later used for tracking /// /// Thrown when fails to make API call - /// + /// /// /// (optional) /// (optional) /// (optional, default to 0) /// string - public string StartWorkflow(string name, Dictionary body, int? version = null, string correlationId = null, int? priority = null) + public string StartWorkflow(string name, Dictionary input, int? version = null, string correlationId = null, int? priority = null) { - ApiResponse localVarResponse = StartWorkflowWithHttpInfo(name, body, version, correlationId, priority); + ApiResponse localVarResponse = StartWorkflowWithHttpInfo(name, input, version, correlationId, priority); return localVarResponse.Data; } @@ -2768,16 +1970,16 @@ public string StartWorkflow(string name, Dictionary body, int? v /// Start a new workflow. Returns the ID of the workflow instance that can be later used for tracking /// /// Thrown when fails to make API call - /// + /// /// /// (optional) /// (optional) /// (optional, default to 0) /// ApiResponse of string - public ApiResponse StartWorkflowWithHttpInfo(string name, Dictionary body, int? version = null, string correlationId = null, int? priority = null) + public ApiResponse StartWorkflowWithHttpInfo(string name, Dictionary input, int? version = null, string correlationId = null, int? priority = null) { // verify the required parameter 'body' is set - if (body == null) + if (input == null) throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->StartWorkflow"); // verify the required parameter 'name' is set if (name == null) @@ -2809,13 +2011,13 @@ public ApiResponse StartWorkflowWithHttpInfo(string name, Dictionary TerminateWithHttpInfo(string workflowId, string reaso /// Test workflow execution using mock data /// /// Thrown when fails to make API call - /// + /// /// Workflow - public Workflow TestWorkflow(WorkflowTestRequest body) + public Workflow TestWorkflow(WorkflowTestRequest request) { - ApiResponse localVarResponse = TestWorkflowWithHttpInfo(body); + ApiResponse localVarResponse = TestWorkflowWithHttpInfo(request); return localVarResponse.Data; } @@ -2931,13 +2133,13 @@ public Workflow TestWorkflow(WorkflowTestRequest body) /// Test workflow execution using mock data /// /// Thrown when fails to make API call - /// + /// /// ApiResponse of Workflow - public ApiResponse TestWorkflowWithHttpInfo(WorkflowTestRequest body) + public ApiResponse TestWorkflowWithHttpInfo(WorkflowTestRequest request) { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling WorkflowResourceApi->TestWorkflow"); + // verify the required parameter 'request' is set + if (request == null) + throw new ApiException(400, "Missing required parameter 'request' when calling WorkflowResourceApi->TestWorkflow"); var localVarPath = "/workflow/test"; var localVarPathParams = new Dictionary(); @@ -2961,13 +2163,13 @@ public ApiResponse TestWorkflowWithHttpInfo(WorkflowTestRequest body) if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - if (body != null && body.GetType() != typeof(byte[])) + if (request != null && request.GetType() != typeof(byte[])) { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + localVarPostBody = this.Configuration.ApiClient.Serialize(request); // http body (model) parameter } else { - localVarPostBody = body; // byte array + localVarPostBody = request; // byte array } // authentication (api_key) required if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) diff --git a/Conductor/Client/Models/IdempotencyStrategy.cs b/Conductor/Client/Models/IdempotencyStrategy.cs new file mode 100644 index 00000000..7d44f46d --- /dev/null +++ b/Conductor/Client/Models/IdempotencyStrategy.cs @@ -0,0 +1,15 @@ +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Conductor.Client.Models +{ + [JsonConverter(typeof(StringEnumConverter))] + public enum IdempotencyStrategy + { + [EnumMember(Value = "FAIL")] + FAIL = 0, + [EnumMember(Value = "RETURN_EXISTING")] + RETURN_EXISTING = 1 + } +} \ No newline at end of file diff --git a/Conductor/Client/Models/StartWorkflowRequest.cs b/Conductor/Client/Models/StartWorkflowRequest.cs index 013751e3..e83bb2de 100644 --- a/Conductor/Client/Models/StartWorkflowRequest.cs +++ b/Conductor/Client/Models/StartWorkflowRequest.cs @@ -27,17 +27,17 @@ public partial class StartWorkflowRequest : IEquatable, IV /// taskToDomain. /// version. /// workflowDef. - public StartWorkflowRequest(string correlationId = default(string), string createdBy = default(string), string externalInputPayloadStoragePath = default(string), Dictionary input = default(Dictionary), string name = default(string), int? priority = default(int?), Dictionary taskToDomain = default(Dictionary), int? version = default(int?), WorkflowDef workflowDef = default(WorkflowDef)) + public StartWorkflowRequest(string correlationId = default(string), string createdBy = default(string), + string externalInputPayloadStoragePath = default(string), + Dictionary input = default(Dictionary), + string name = default(string), + int? priority = default(int?), + Dictionary taskToDomain = default(Dictionary), + int? version = default(int?), + WorkflowDef workflowDef = default(WorkflowDef) + ) { - // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for StartWorkflowRequest and cannot be null"); - } - else - { - this.Name = name; - } + this.Name = name; this.CorrelationId = correlationId; this.CreatedBy = createdBy; this.ExternalInputPayloadStoragePath = externalInputPayloadStoragePath; @@ -46,8 +46,14 @@ public partial class StartWorkflowRequest : IEquatable, IV this.TaskToDomain = taskToDomain; this.Version = version; this.WorkflowDef = workflowDef; + // this.IdempotencyKey = idempotencyKey; + // this.IdempotencyStrategy = idempotencyStrategy; } + public IdempotencyStrategy IdempotencyStrategy { get; set; } + + public string IdempotencyKey { get; set; } + /// /// Gets or Sets CorrelationId ///