OpenAuth.Net/docs/core/thirdparty.md
2023-08-11 17:47:02 +08:00

37 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 三方对接
* 在OpenAuth中设计表单注意表单中的控件名称在步骤3调用OpenAuth创建流程实例接口时frmData参数中的属性必须严格按该命名提交。
![](/formthirdparty.png "表单设计说明")
* 在OpenAuth中设计流程制定相关的工作流程并在每个流程节点配置回调URL路径如下
![](/flowthirdparty.png "三方URL设置")
* 三方已有系统界面提交表单时调用创建流程实例接口http://localhost:52789/api/FlowInstances/Add在OpenAuth中创建一条新的流程实例 接口参数如下:
```javascript
{
schemeId:'cdd8191e-6a99-4d66-aac0-fae52c0f2232', //流程模板中已存在的模板ID
schemeCode:'', //与流程模板ID二者选一个即可
frmData:'{\"TOOLS\":\"电脑\",\"NUMBERS\":\"1\"}', //严格按照第一步中表单规则
code:'1563811467051',
customName:'三方创建的新物品领用',
}
```
* 用户正常在OpenAuth中执行流程如果当前节点设置了回调URL的节点OpenAuth会采用WebAPI POST方式回调回调时具体参数如下
```javascript
{
flowInstanceId:"0ceff0f8-f848-440c-bc26-d8605ac858cd", //流程实例ID
nodeName: "admin审批", //节点名称
nodeId: "15333321", //节点ID
userId: "0ceff0f8-f848-440c-bc26-d8605ac858cd",
userName: "admin", //审核人账号
result: 1, //审核结果 1通过;2不通过3驳回
description: "做的不错", //审核描述
execTime: "2019-07-07 12:00:00", //审核时间
isFinish: true //是否结束
}
```