diff --git a/Conductor/Api/WorkflowResourceApi.cs b/Conductor/Api/WorkflowResourceApi.cs index 9b55ff4c..f0969e27 100644 --- a/Conductor/Api/WorkflowResourceApi.cs +++ b/Conductor/Api/WorkflowResourceApi.cs @@ -315,6 +315,32 @@ public interface IWorkflowResourceApi : IApiAccessor /// /// 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 /// @@ -1719,6 +1745,94 @@ public ApiResponse PauseWorkflowWithHttpInfo(string workflowId) null); } + + /// + /// 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 ///