DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/process/save");
OapiProcessSaveRequest req = new OapiProcessSaveRequest();
SaveProcessRequest obj1 = new SaveProcessRequest();
obj1.setAgentid(123L);
obj1.setProcessCode("a");
obj1.setDisableFormEdit(true);
obj1.setDisableStopProcessButton(true);
obj1.setName("a");
obj1.setDescription("a");
List<FormComponentVo> list3 = new ArrayList<FormComponentVo>();
FormComponentVo obj4 = new FormComponentVo();
list3.add(obj4);
FormComponentPropVo obj6 = new FormComponentPropVo();
obj6.setId("aaa");
obj6.setLabel("aaa");
obj6.setRequired(true);
obj6.setNotPrint("0");
obj6.setPlaceholder("aa");
obj6.setNotUpper("1");
obj6.setUnit("元");
obj6.setFormula("1");
obj6.setOptions(""a","b"");
obj6.setFormat("yyyy-MM-dd HH:mm");
obj6.setDuration(true);
obj6.setChoice(1L);
obj6.setLink("https://www.dingtalk.com");
List<FormComponentStatVo> list8 = new ArrayList<FormComponentStatVo>();
FormComponentStatVo obj9 = new FormComponentStatVo();
list8.add(obj9);
obj9.setId("aaa");
obj9.setLabel("aaa");
obj9.setUpper(true);
obj9.setUnit("元");
obj6.setStatField(list8);
obj6.setActionName("增加明细");
obj6.setContent("超链接");
obj6.setBizAlias("leave");
obj6.setBizType("attendance.leave");
obj6.setAsyncCondition(true);
list5.setProps(obj6);
List<FormComponentVo2> list12 = new ArrayList<FormComponentVo2>();
FormComponentVo2 obj13 = new FormComponentVo2();
list12.add(obj13);
FormComponentPropVo2 obj15 = new FormComponentPropVo2();
obj15.setId("aaa");
obj15.setLabel("aaa");
obj15.setRequired(true);
obj15.setNotPrint("0");
obj15.setPlaceholder("aa");
obj15.setNotUpper("1");
obj15.setUnit("元");
obj15.setFormula("1");
obj15.setOptions(""a","b"");
obj15.setFormat("yyyy-MM-dd HH:mm");
obj15.setDuration(true);
obj15.setChoice(1L);
obj15.setLink("https://www.dingtalk.com");
obj15.setContent("超链接");
obj15.setBizAlias("type");
obj15.setBizType("type");
obj15.setTableViewMode("list");
obj15.setCommonBizType("selectField");
obj15.setAsyncCondition(true);
list14.setProps(obj15);
List<FormComponentVo3> list18 = new ArrayList<FormComponentVo3>();
FormComponentVo3 obj19 = new FormComponentVo3();
list18.add(obj19);
FormComponentPropVo3 obj21 = new FormComponentPropVo3();
obj21.setId("aa");
obj21.setLabel("aaa");
obj21.setRequired(true);
obj21.setNotPrint("0");
obj21.setPlaceholder("aa");
obj21.setNotUpper("1");
obj21.setUnit("元");
obj21.setFormula("abc");
obj21.setOptions(""a","b'");
obj21.setFormat("yyyy-MM-dd HH:mm");
obj21.setDuration(true);
obj21.setChoice(1L);
obj21.setBizAlias("a");
obj21.setAsyncCondition(true);
list20.setProps(obj21);
obj19.setComponentName("TextField");
list16.setChildren(list18);
obj13.setComponentName("TextField");
list10.setChildren(list12);
obj4.setComponentName("TextField");
obj1.setFormComponentList(list3);
obj1.setFakeMode(true);
obj1.setTemplateEditUrl("https:///www.dingtalk.com");
obj1.setHidden(false);
ProcessConfig obj22 = new ProcessConfig();
obj22.setDisableFormEdit(false);
obj22.setDisableStopProcessButton(false);
obj22.setHidden(false);
obj22.setTemplateEditUrl("https:///www.dingtalk.com");
obj22.setDisableDeleteProcess(false);
obj22.setDisableResubmit(false);
obj22.setDisableHomepage(false);
obj22.setFakeTemplateEditUrl("https:///www.dingtalk.com");
obj1.setProcessConfig(obj22);
obj1.setCreateInstanceMobileUrl("https:///www.dingtalk.com");
obj1.setCreateInstancePcUrl("https:///www.dingtalk.com");
obj1.setDirId("abcd");
obj1.setOriginDirId("bcde");
obj1.setIcon("common");
req.setSaveProcessRequest(obj1);
OapiProcessSaveResponse rsp = client.execute(req, access_token);
System.out.println(rsp.getBody());
IDingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/process/save");
OapiProcessSaveRequest req = new OapiProcessSaveRequest();
OapiProcessSaveRequest.SaveProcessRequestDomain obj1 = new OapiProcessSaveRequest.SaveProcessRequestDomain();
obj1.Agentid = 123L;
obj1.ProcessCode = "a";
obj1.DisableFormEdit = true;
obj1.DisableStopProcessButton = true;
obj1.Name = "a";
obj1.Description = "a";
List<OapiProcessSaveRequest.FormComponentVoDomain> list3 = new List<OapiProcessSaveRequest.FormComponentVoDomain>();
OapiProcessSaveRequest.FormComponentVoDomain obj4 = new OapiProcessSaveRequest.FormComponentVoDomain();
list3.Add(obj4);
OapiProcessSaveRequest.FormComponentPropVoDomain obj5 = new OapiProcessSaveRequest.FormComponentPropVoDomain();
obj5.Id = "aaa";
obj5.Label = "aaa";
obj5.Required = true;
obj5.NotPrint = "0";
obj5.Placeholder = "aa";
obj5.NotUpper = "1";
obj5.Unit = "元";
obj5.Formula = "1";
obj5.Options = ""a","b"";
obj5.Format = "yyyy-MM-dd HH:mm";
obj5.Duration = true;
obj5.Choice = 1L;
obj5.Link = "https://www.dingtalk.com";
List<OapiProcessSaveRequest.FormComponentStatVoDomain> list7 = new List<OapiProcessSaveRequest.FormComponentStatVoDomain>();
OapiProcessSaveRequest.FormComponentStatVoDomain obj8 = new OapiProcessSaveRequest.FormComponentStatVoDomain();
list7.Add(obj8);
obj8.Id = "aaa";
obj8.Label = "aaa";
obj8.Upper = true;
obj8.Unit = "元";
obj5.StatField= list7;
obj5.ActionName = "增加明细";
obj5.Content = "超链接";
obj5.BizAlias = "leave";
obj5.BizType = "attendance.leave";
obj5.AsyncCondition = true;
obj4.Props= obj5;
List<OapiProcessSaveRequest.FormComponentVo2Domain> list10 = new List<OapiProcessSaveRequest.FormComponentVo2Domain>();
OapiProcessSaveRequest.FormComponentVo2Domain obj11 = new OapiProcessSaveRequest.FormComponentVo2Domain();
list10.Add(obj11);
OapiProcessSaveRequest.FormComponentPropVo2Domain obj12 = new OapiProcessSaveRequest.FormComponentPropVo2Domain();
obj12.Id = "aaa";
obj12.Label = "aaa";
obj12.Required = true;
obj12.NotPrint = "0";
obj12.Placeholder = "aa";
obj12.NotUpper = "1";
obj12.Unit = "元";
obj12.Formula = "1";
obj12.Options = ""a","b"";
obj12.Format = "yyyy-MM-dd HH:mm";
obj12.Duration = true;
obj12.Choice = 1L;
obj12.Link = "https://www.dingtalk.com";
obj12.Content = "超链接";
obj12.BizAlias = "type";
obj12.BizType = "type";
obj12.TableViewMode = "list";
obj12.CommonBizType = "selectField";
obj12.AsyncCondition = true;
obj11.Props= obj12;
List<OapiProcessSaveRequest.FormComponentVo3Domain> list14 = new List<OapiProcessSaveRequest.FormComponentVo3Domain>();
OapiProcessSaveRequest.FormComponentVo3Domain obj15 = new OapiProcessSaveRequest.FormComponentVo3Domain();
list14.Add(obj15);
OapiProcessSaveRequest.FormComponentPropVo3Domain obj16 = new OapiProcessSaveRequest.FormComponentPropVo3Domain();
obj16.Id = "aa";
obj16.Label = "aaa";
obj16.Required = true;
obj16.NotPrint = "0";
obj16.Placeholder = "aa";
obj16.NotUpper = "1";
obj16.Unit = "元";
obj16.Formula = "abc";
obj16.Options = ""a","b'";
obj16.Format = "yyyy-MM-dd HH:mm";
obj16.Duration = true;
obj16.Choice = 1L;
obj16.BizAlias = "a";
obj16.AsyncCondition = true;
obj15.Props= obj16;
obj15.ComponentName = "TextField";
obj11.Children= list14;
obj11.ComponentName = "TextField";
obj4.Children= list10;
obj4.ComponentName = "TextField";
obj1.FormComponentList= list3;
obj1.FakeMode = true;
obj1.TemplateEditUrl = "https:///www.dingtalk.com";
obj1.Hidden = false;
OapiProcessSaveRequest.ProcessConfigDomain obj17 = new OapiProcessSaveRequest.ProcessConfigDomain();
obj17.DisableFormEdit = false;
obj17.DisableStopProcessButton = false;
obj17.Hidden = false;
obj17.TemplateEditUrl = "https:///www.dingtalk.com";
obj17.DisableDeleteProcess = false;
obj17.DisableResubmit = false;
obj17.DisableHomepage = false;
obj17.FakeTemplateEditUrl = "https:///www.dingtalk.com";
obj1.ProcessConfig= obj17;
obj1.CreateInstanceMobileUrl = "https:///www.dingtalk.com";
obj1.CreateInstancePcUrl = "https:///www.dingtalk.com";
obj1.DirId = "abcd";
obj1.OriginDirId = "bcde";
obj1.Icon = "common";
req.SaveProcessRequest_ = obj1;
OapiProcessSaveResponse rsp = client.Execute(req, access_token);
Console.WriteLine(rsp.Body);
include "TopSdk.php";
date_default_timezone_set('Asia/Shanghai');
$c = new DingTalkClient(DingTalkConstant::$CALL_TYPE_OAPI, DingTalkConstant::$METHOD_POST , DingTalkConstant::$FORMAT_JSON);
$req = new OapiProcessSaveRequest;
$saveProcessRequest = new SaveProcessRequest;
$saveProcessRequest->agentid="123";
$saveProcessRequest->process_code="a";
$saveProcessRequest->disable_form_edit="true";
$saveProcessRequest->disable_stop_process_button="true";
$saveProcessRequest->name="a";
$saveProcessRequest->description="a";
$form_component_list = new FormComponentVo;
$props = new FormComponentPropVo;
$props->id="aaa";
$props->label="aaa";
$props->required="true";
$props->not_print="0";
$props->placeholder="aa";
$props->not_upper="1";
$props->unit="元";
$props->formula="1";
$props->options="[\"a\",\"b\"]";
$props->format="yyyy-MM-dd HH:mm";
$props->duration="true";
$props->choice="1";
$props->link="https://www.dingtalk.com";
$stat_field = new FormComponentStatVo;
$stat_field->id="aaa";
$stat_field->label="aaa";
$stat_field->upper="true";
$stat_field->unit="元";
$props->stat_field = array($stat_field);
$props->action_name="增加明细";
$props->content="超链接";
$props->biz_alias="leave";
$props->biz_type="attendance.leave";
$props->async_condition="true";
$form_component_list->props = $props;
$children = new FormComponentVo2;
$props = new FormComponentPropVo2;
$props->id="aaa";
$props->label="aaa";
$props->required="true";
$props->not_print="0";
$props->placeholder="aa";
$props->not_upper="1";
$props->unit="元";
$props->formula="1";
$props->options="[\"a\",\"b\"]";
$props->format="yyyy-MM-dd HH:mm";
$props->duration="true";
$props->choice="1";
$props->link="https://www.dingtalk.com";
$props->content="超链接";
$props->biz_alias="type";
$props->biz_type="type";
$props->table_view_mode="list";
$props->common_biz_type="selectField";
$props->async_condition="true";
$children->props = $props;
$children = new FormComponentVo3;
$props = new FormComponentPropVo3;
$props->id="aa";
$props->label="aaa";
$props->required="true";
$props->not_print="0";
$props->placeholder="aa";
$props->not_upper="1";
$props->unit="元";
$props->formula="abc";
$props->options="[\"a\",\"b']";
$props->format="yyyy-MM-dd HH:mm";
$props->duration="true";
$props->choice="1";
$props->biz_alias="a";
$props->async_condition="true";
$children->props = $props;
$children->component_name="TextField";
$children->children = array($children);
$children->component_name="TextField";
$form_component_list->children = array($children);
$form_component_list->component_name="TextField";
$saveProcessRequest->form_component_list = array($form_component_list);
$saveProcessRequest->fake_mode="true";
$saveProcessRequest->template_edit_url="https:///www.dingtalk.com";
$saveProcessRequest->hidden="false";
$process_config = new ProcessConfig;
$process_config->disable_form_edit="false";
$process_config->disable_stop_process_button="false";
$process_config->hidden="false";
$process_config->template_edit_url="https:///www.dingtalk.com";
$process_config->disable_delete_process="false";
$process_config->disable_resubmit="false";
$process_config->disable_homepage="false";
$process_config->fake_template_edit_url="https:///www.dingtalk.com";
$saveProcessRequest->process_config = $process_config;
$saveProcessRequest->create_instance_mobile_url="https:///www.dingtalk.com";
$saveProcessRequest->create_instance_pc_url="https:///www.dingtalk.com";
$saveProcessRequest->dir_id="abcd";
$saveProcessRequest->origin_dir_id="bcde";
$saveProcessRequest->icon="common";
$req->setSaveProcessRequest($saveProcessRequest);
$resp = $c->execute($req, $access_token, "https://oapi.dingtalk.com/topapi/process/save");
curl -X POST "https://oapi.dingtalk.com/topapi/process/save" \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'access_token=b9c9b684-bd54-49db-8a5c-10e3f6a2d27e' \
-d 'saveProcessRequest=null'
# -*- coding: utf-8 -*-
import dingtalk.api
req=dingtalk.api.OapiProcessSaveRequest("https://oapi.dingtalk.com/topapi/process/save")
req.saveProcessRequest=""
try:
resp= req.getResponse(access_token)
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"dingtalk.oapi.process.save");
add_param(pRequest,"saveProcessRequest","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,sessionKey);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('dingtalk.oapi.process.save', {
'saveProcessRequest':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})