开发者社区> 问答> 正文

调用钉钉 官方oa「发起OA审批实例」接口,一直返回错误「审批实例参数错误」?

错误响应:

{"requestid":"xx","code":"processInstanceInvalidParameter","message":"审批实例参数错误"}

以下为调用参数和对应模板的结构,只有出库数量是必填的,我想知道提示「审批实例参数错误」的依据是什么?

接口: https://api.dingtalk.com/v1.0/workflow/processInstances

请求体:

{
  "formComponentValues": [
    {
      "name": "出库数量",
      "value": "48"
    }
  ],
  "originatorUserId": "xxxxxx",
  "processCode": "xxxxx"
}

对应模板表单结构:

{
	"result":{
		"schemaContent":{
			"icon":"common",
			"title":"设备出库登记审批",
			"items":[
				{
					"componentName":"TextField",
					"props":{
						"staffStatusEnabled":false,
						"holidayOptions":[],
						"bizAlias":"",
						"id":"TextField-IH4T9JQ9",
						"label":"设备类型",
						"placeholder":"",
						"push":{}
					}
				},
				{
					"componentName":"TextField",
					"props":{
						"staffStatusEnabled":false,
						"holidayOptions":[],
						"bizAlias":"",
						"id":"TextField_1J4FL8RPPKDC0",
						"label":"设备型号",
						"placeholder":"请输入",
						"required":false,
						"push":{}
					}
				},
				{
					"componentName":"DDDateField",
					"props":{
						"staffStatusEnabled":false,
						"unit":"天",
						"holidayOptions":[],
						"format":"yyyy-MM-dd",
						"bizAlias":"",
						"id":"DDDateField_1T99PBW4877K0",
						"label":"出库时间",
						"placeholder":"请选择",
						"required":false,
						"push":{}
					}
				},
				{
					"componentName":"TextField",
					"props":{
						"staffStatusEnabled":false,
						"holidayOptions":[],
						"bizAlias":"",
						"id":"TextField_216IWPAEVB8G0",
						"label":"出库人",
						"placeholder":"",
						"required":false,
						"push":{}
					}
				},
				{
					"componentName":"TextField",
					"props":{
						"staffStatusEnabled":false,
						"holidayOptions":[],
						"bizAlias":"",
						"id":"TextField_1TOFHMIKW1B40",
						"label":"关联客户",
						"placeholder":"请输入",
						"required":false,
						"push":{}
					}
				},
				{
					"componentName":"TextField",
					"props":{
						"staffStatusEnabled":false,
						"holidayOptions":[],
						"bizAlias":"",
						"id":"TextField_1BMK5A5ZOLWG0",
						"label":"出库数量",
						"placeholder":"请输入",
						"required":true,
						"push":{}
					}
				},
				{
					"componentName":"TextField",
					"props":{
						"staffStatusEnabled":false,
						"holidayOptions":[],
						"bizAlias":"",
						"id":"TextField_1X38X0QRMTFK0",
						"label":"出库预估金额(合计)",
						"placeholder":"请输入",
						"required":false,
						"push":{}
					}
				},
				{
					"componentName":"TextField",
					"props":{
						"staffStatusEnabled":false,
						"holidayOptions":[],
						"bizAlias":"",
						"id":"TextField_SKLYQZCPRC00",
						"label":"关联项目",
						"placeholder":"请输入",
						"required":false,
						"push":{}
					}
				},
				{
					"componentName":"TextField",
					"props":{
						"staffStatusEnabled":false,
						"holidayOptions":[],
						"bizAlias":"",
						"id":"TextField_H0NNOTKYTQO0",
						"label":"项目成本中心",
						"placeholder":"请输入",
						"required":false,
						"push":{}
					}
				},
				{
					"componentName":"TextareaField",
					"props":{
						"staffStatusEnabled":false,
						"holidayOptions":[],
						"id":"TextareaField-IH4T9JQK",
						"label":"备注",
						"placeholder":"请输入",
						"push":{}
					}
				}
			]
		},
		"name":"设备出库登记审批"
	}
}

展开
收起
1636605356392954 2023-02-03 09:38:26 1037 1
2 条回答
写回答
取消 提交回答
  • 请问是怎么解决的,我也遇到这个问题了,配置都没问题,就是一只报错

    2023-11-13 10:53:43
    赞同 展开评论 打赏
  • 已解决,无需回复

    2023-02-03 12:04:11
    赞同 展开评论 打赏
来源圈子
更多
收录在圈子:
+ 订阅
问答排行榜
最热
最新

相关电子书

更多
钉钉小程序——为工作方式插上翅膀 立即下载
钉钉客户端自动化的应用 立即下载
使命必达 —— 钉钉企业级 消息服务的机遇与挑战 立即下载