钉钉审批流表单格式错误
回 1楼令九的帖子
亲,我用的是钉钉自带的审批模板,ProcessCode也赋值了,
look~
自己也有创建过新的审批模板,试着调用后,得到的反馈也是【审批流表单格式错误】,
look~
1.设计模板:
2.调用代码:
DingTalkClient client = DefaultDingTalkClient('https://eco.taobao.com/router/rest','json');
SmartworkBpmsProcessinstanceCreateRequest req = new SmartworkBpmsProcessinstanceCreateRequest();
req.setAgentId(Long.valueOf(6853696));
req.setProcessCode('
PROC-EF6YCS6WO2-XEK5GX8VQWC9NXUKUDDL1-EKHIMBHI-DO1');
req.setOriginatorUserId('0545050127784700');
req.setDeptId(Long.valueOf('3288450'));
req.setApprovers('0545050127784700');
List list2 =new ArrayList<>();req.setFormComponentValues(list2);
SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVo obj3 = new SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVo();
obj3.setName('
订单号');
obj3.setValue('test123');
SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVo obj4 = new SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVo();
obj4.setName('
客户名称');
obj4.setValue('客户test');
SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVo obj5 = new SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVo();
obj5.setName('
产品数量及名称');
obj5.setValue('NT637B洗标 45mm*150mm 70# 2卷');
SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVo obj6 = new SmartworkBpmsProcessinstanceCreateRequest.FormComponentValueVo();
obj6.setName('
审核理由');
obj6.setValue('审核测试');
list2.add(obj3);
list2.add(obj4);
list2.add(obj5);
list2.add(obj6);
req.setFormComponentValues(
list2);
SmartworkBpmsProcessinstanceCreateResponse rsp = client.execute(req, 'e20805f1b4ab37f18f629f57e29e88f1');
System.out.println(rsp.getBody());
3.返回数据:
{'dingtalk_smartwork_bpms_processinstance_create_response': {'result': {'ding_open_errcode': 810003,'error_msg': '审批流表单格式错误','is_success': false},'request_id': 'uak2zh81egg'}}
-------------------------
Re回 1楼令九的帖子
另外postman上直接测试也是返回的这个错误,再次look~
URL:
https://eco.taobao.com/router/rest?session=e20805f1b4ab37f18f629f57e29e88f1×tamp=2017-07-18 15:30:13&v=2.0&format=json&method=dingtalk.smartwork.bpms.processinstance.create&process_code=PROC-EF6YCS6WO2-XEK5GX8VQWC9NXUKUDDL1-EKHIMBHI-DO1&originator_user_id=0545050127784700&dept_id=3288450&approvers=0545050127784700&form_component_values=[
{'name':'订单号','value':'200170711002'}
,
{'name':'客户名称','value':'苏州市xxx有限责任公司'}
,
{'name':'产品数量及名称','value':'2卷NT637B洗标 45mm*150mm 70'}
,
{'name':'审核理由','value':'钉钉审批流程测试'}
]
Body:
{'dingtalk_smartwork_bpms_processinstance_create_response':{'result':{'ding_open_errcode':810003,'error_msg':'审批流表单格式错误','is_success':false},'request_id':'usr0gjhut3e'}}
-------------------------
Re回 4楼令九的帖子
我重新调整了一下,
发现你说的 [目前只开放最基本的三种表单控件:明细,单行输入框,图片]是真真的,
只多加个[文字说明]也是不行的~
虽说看上去有点儿单调,不过总算是连接成功了,
盼着亲们能早日将其他控件也完善上去,
这接口就真真的完美了~
PS:啥时候能加其他控件了,通知在下一声,在下定麻溜的更新的!!!
-------------------------
回 6楼咚咚咚呛的帖子
亲,我的测试代码是没有问题的,设计画面你可以参考我7/18日的审批模板,唯一要点是:目前审批接口
只接受【明细,单行输入框,图片】三个控件
,其余控件一个都不要拖进去哦
赞0
踩0