public async Task <StartProcessInstanceResponse> StartProcessInstanceAsync(StartProcessInstanceRequest request) { AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); StartProcessInstanceHeaders headers = new StartProcessInstanceHeaders(); return(await StartProcessInstanceWithOptionsAsync(request, headers, runtime)); }
public StartProcessInstanceResponse StartProcessInstance(StartProcessInstanceRequest request) { AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); StartProcessInstanceHeaders headers = new StartProcessInstanceHeaders(); return(StartProcessInstanceWithOptions(request, headers, runtime)); }
public async Task <StartProcessInstanceResponse> StartProcessInstanceWithOptionsAsync(StartProcessInstanceRequest request, StartProcessInstanceHeaders headers, AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime) { AlibabaCloud.TeaUtil.Common.ValidateModel(request); Dictionary <string, object> body = new Dictionary <string, object>() { }; if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.Approvers)) { body["approvers"] = request.Approvers; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.CcList)) { body["ccList"] = request.CcList; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.CcPosition)) { body["ccPosition"] = request.CcPosition; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.DeptId)) { body["deptId"] = request.DeptId; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.FormComponentValues)) { body["formComponentValues"] = request.FormComponentValues; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.MicroappAgentId)) { body["microappAgentId"] = request.MicroappAgentId; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.OriginatorUserId)) { body["originatorUserId"] = request.OriginatorUserId; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.ProcessCode)) { body["processCode"] = request.ProcessCode; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(request.TargetSelectActioners)) { body["targetSelectActioners"] = request.TargetSelectActioners; } Dictionary <string, string> realHeaders = new Dictionary <string, string>() { }; if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.CommonHeaders)) { realHeaders = headers.CommonHeaders; } if (!AlibabaCloud.TeaUtil.Common.IsUnset(headers.XAcsDingtalkAccessToken)) { realHeaders["x-acs-dingtalk-access-token"] = AlibabaCloud.TeaUtil.Common.ToJSONString(headers.XAcsDingtalkAccessToken); } AlibabaCloud.OpenApiClient.Models.OpenApiRequest req = new AlibabaCloud.OpenApiClient.Models.OpenApiRequest { Headers = realHeaders, Body = AlibabaCloud.OpenApiUtil.Client.ParseToMap(body), }; return(TeaModel.ToObject <StartProcessInstanceResponse>(await DoROARequestAsync("StartProcessInstance", "workflow_1.0", "HTTP", "POST", "AK", "/v1.0/workflow/processInstances", "json", req, runtime))); }