第三方系统平台如何对接gooflow2.0

第一步,参与者数据源配置

目前提供3种参与者数据源(员工,角色,部门),还有一种sql语句

XML配置如下

  1 <?xml version="1.0" encoding="utf-8"?>
  2 <!--参与者配置-->
  3 <flowParticipants>
  4   <chooseParticipant>
  5     <id>1</id>
  6     <name>员工参与者</name>
  7     <sql>SELECT ID,FullName Participant FROM dbo.Hr_Employee WHERE ID IN ({0})</sql>
  8     <connectionKey>HRBusinessSqlServer</connectionKey>
  9     <!--数据源-->
 10     <chooseDataSource tableName="dbo.Hr_Employee" selectField="*" sortField="ID">
 11       <whereFields>
 12         <whereField fieldName="DictionaryNo" fieldText="员工代码"></whereField>
 13         <whereField fieldName="FullName" fieldText="员工姓名"></whereField>
 14       </whereFields>
 15       <columnFields>
 16         <columnField fieldName="DictionaryNo" fieldText="员工代码" align="center"></columnField>
 17         <columnField fieldName="FullName" fieldText="员工姓名" align="center"></columnField>
 18         <columnField fieldName="EnName" fieldText="英文名" align="center"></columnField>
 19         <columnField fieldName="Gender" fieldText="性别" align="center"></columnField>
 20         <columnField fieldName="DutyName" fieldText="所属岗位" align="center"></columnField>
 21         <columnField fieldName="WorkKind" fieldText="用工性质" align="center"></columnField>
 22       </columnFields>
 23     </chooseDataSource>
 24     <!--字段映射-->
 25     <chooseDataMappers>
 26       <chooseDataMapper type="valueField" name="员工ID" fromField="ID" toField="ID"></chooseDataMapper>
 27       <chooseDataMapper type="textField" name="员工姓名" fromField="FullName" toField="ApproverName"></chooseDataMapper>
 28     </chooseDataMappers>
 29   </chooseParticipant>
 30   
 31   <chooseParticipant>
 32     <id>2</id>
 33     <name>岗位参与者</name>
 34     <sql>SELECT ID,FullName Participant FROM dbo.Hr_Employee WHERE DutyID IN ({0})</sql>
 35     <connectionKey>HRBusinessSqlServer</connectionKey>
 36     <!--数据源-->
 37     <chooseDataSource tableName="dbo.View_Duty" selectField="*" sortField="ID">
 38       <whereFields>
 39         <whereField fieldName="DictionaryNo" fieldText="岗位代码"></whereField>
 40         <whereField fieldName="DutyName" fieldText="岗位名称"></whereField>
 41       </whereFields>
 42       <columnFields>
 43         <columnField fieldName="DictionaryNo" fieldText="岗位代码" align="center"></columnField>
 44         <columnField fieldName="DutyName" fieldText="岗位名称" align="center"></columnField>
 45         <columnField fieldName="DepName" fieldText="部门名称" align="center"></columnField>
 46         <columnField fieldName="LimitedStaffing" fieldText="定编人数" align="center"></columnField>
 47       </columnFields>
 48     </chooseDataSource>
 49     <!--字段映射-->
 50     <chooseDataMappers>
 51       <chooseDataMapper type="valueField" name="岗位ID" fromField="ID" toField="ID"></chooseDataMapper>
 52       <chooseDataMapper type="textField" name="岗位名称" fromField="DutyName" toField="ApproverName"></chooseDataMapper>
 53     </chooseDataMappers>
 54   </chooseParticipant>
 55   
 56   <chooseParticipant>
 57     <id>3</id>
 58     <name>部门参与者</name>
 59     <sql>SELECT ID,FullName Participant FROM dbo.Hr_Employee WHERE DepID IN ({0})</sql>
 60     <connectionKey>HRBusinessSqlServer</connectionKey>
 61     <!--数据源-->
 62     <chooseDataSource tableName="dbo.View_Hr_Department" selectField="*" sortField="ID">
 63       <whereFields>
 64         <whereField fieldName="DictionaryNo" fieldText="部门代码"></whereField>
 65         <whereField fieldName="DepName" fieldText="部门名称"></whereField>
 66       </whereFields>
 67       <columnFields>
 68         <columnField fieldName="DictionaryNo" fieldText="部门代码" align="center"></columnField>
 69         <columnField fieldName="DepName" fieldText="部门名称" align="center"></columnField>
 70         <columnField fieldName="Manager" fieldText="部分负责人" align="center"></columnField>
 71         <columnField fieldName="CompanyName" fieldText="所属公司" align="center"></columnField>
 72         <columnField fieldName="DepTel" fieldText="部分电话" align="center"></columnField>
 73       </columnFields>
 74     </chooseDataSource>
 75     <!--字段映射-->
 76     <chooseDataMappers>
 77       <chooseDataMapper type="valueField" name="部分ID" fromField="ID" toField="ID"></chooseDataMapper>
 78       <chooseDataMapper type="textField" name="部分名称" fromField="DepName" toField="ApproverName"></chooseDataMapper>
 79     </chooseDataMappers>
 80   </chooseParticipant>
 81   
 82   <sqlParticipant>
 83     <id>4</id>
 84     <name>SQL语句参与者</name>
 85     <connectionKey>HRBusinessSqlServer</connectionKey>
 86     <sqlList>
 87       <executeSql keyID="7cd0625e-c200-4ae4-8798-f250bd132a0b" name="给部门负责人审批" time="2017-08-30 13:19:51">
 88         <flowID>3</flowID>
 89         <nodeID>flow_node_11707280144501</nodeID>
 90         <sqlText>
 91           SELECT b.EmployeeID ID,b.Manager Participant FROM dbo.Hr_Employee a
 92           JOIN dbo.View_Hr_Department b ON b.ID=a.DepID
 93           WHERE a.ID={0}
 94         </sqlText>
 95       </executeSql>
 96       <executeSql keyID="8fe98a63-6d37-4566-be76-110fa567baf7" name="给部分负责人审批" time="2017-08-29 15:09:07">
 97         <flowID>4</flowID>
 98         <nodeID>flow_node_11708291502855</nodeID>
 99         <sqlText>
100           SELECT b.EmployeeID ID,b.Manager Participant FROM dbo.Hr_Employee a
101           JOIN dbo.View_Hr_Department b ON b.ID=a.DepID
102           WHERE a.ID={0}</sqlText>
103       </executeSql>
104       <executeSql keyID="bb561444-7a4d-4590-8f3b-6d1e9eab98fe" name=" 给部分负责人审批" time="2017-09-03 22:25:13">
105         <flowID>5</flowID>
106         <nodeID>flow_node_11709032218118</nodeID>
107         <sqlText>
108           SELECT b.EmployeeID ID,b.Manager Participant FROM dbo.Hr_Employee a
109           JOIN dbo.View_Hr_Department b ON b.ID=a.DepID
110           WHERE a.ID={0}</sqlText>
111       </executeSql>
112       <executeSql keyID="c68e2cea-3894-4ddc-bfe1-95ee3c263a4e" name="部分负责人" time="2017-09-07 21:15:36">
113         <flowID>6</flowID>
114         <nodeID>flow_node_11709072113622</nodeID>
115         <sqlText>
116           SELECT b.EmployeeID ID,b.Manager Participant FROM dbo.Hr_Employee a
117           JOIN dbo.View_Hr_Department b ON b.ID=a.DepID
118           WHERE a.ID={0}</sqlText>
119       </executeSql>
120       <executeSql keyID="00af66f2-1d87-42b2-8f1a-9eca73810685" name="给部门负责人审批" time="2017-09-09 23:34:54">
121         <flowID>7</flowID>
122         <nodeID>flow_node_11709092333349</nodeID>
123         <sqlText>
124           SELECT b.EmployeeID ID,b.Manager Participant FROM dbo.Hr_Employee a
125           JOIN dbo.View_Hr_Department b ON b.ID=a.DepID
126           WHERE a.ID={0}</sqlText>
127       </executeSql>
128       <executeSql keyID="7c154523-8c7a-401c-b999-34c1ec9f68c4" name="给部分负责人审批" time="2017-09-20 09:40:45">
129         <flowID>4</flowID>
130         <nodeID>flow_node_11708291502855</nodeID>
131         <sqlText>
132           SELECT b.EmployeeID ID,b.Manager Participant FROM dbo.Hr_Employee a
133           JOIN dbo.View_Hr_Department b ON b.ID=a.DepID
134           WHERE a.ID={0}</sqlText>
135       </executeSql>
136       <executeSql keyID="f293d910-e7f3-409c-996d-389e475f6790" name="给部门负责人审批" time="2017-09-22 21:23:39">
137         <flowID>3</flowID>
138         <nodeID>flow_node_11707261535743</nodeID>
139         <sqlText>  SELECT b.EmployeeID ID,b.Manager Participant FROM dbo.Hr_Employee a
140           JOIN dbo.View_Hr_Department b ON b.ID=a.DepID
141           WHERE a.ID={0}</sqlText>
142       </executeSql>
143       <executeSql keyID="1f51f9db-267b-4e07-9c21-9b326f6ba190" name="给部门负责人审批" time="2017-09-23 00:47:18">
144         <flowID>3</flowID>
145         <nodeID>flow_node_117072801400062</nodeID>
146         <sqlText>  SELECT b.EmployeeID ID,b.Manager Participant FROM dbo.Hr_Employee a
147           JOIN dbo.View_Hr_Department b ON b.ID=a.DepID
148           WHERE a.ID={0}</sqlText>
149       </executeSql>
150       <executeSql keyID="e46e7772-0962-4cbe-abf2-4ab662b1db2b" name=" 给部分负责人审批" time="2017-09-28 15:17:14">
151         <flowID>5</flowID>
152         <nodeID>flow_node_11709032218118</nodeID>
153         <sqlText>
154           SELECT b.EmployeeID ID,b.Manager Participant FROM dbo.Hr_Employee a
155           JOIN dbo.View_Hr_Department b ON b.ID=a.DepID
156           WHERE a.ID={0}</sqlText>
157       </executeSql>
158       <executeSql keyID="8ce69fd2-3b6e-42e8-9608-f6d75d80cad6" name=" 给部分负责人审批" time="2017-09-28 15:17:20">
159         <flowID>5</flowID>
160         <nodeID>flow_node_11709032218118</nodeID>
161         <sqlText>
162           SELECT b.EmployeeID ID,b.Manager Participant FROM dbo.Hr_Employee a
163           JOIN dbo.View_Hr_Department b ON b.ID=a.DepID
164           WHERE a.ID={0}</sqlText>
165       </executeSql>
166     </sqlList>
167   </sqlParticipant>
168 </flowParticipants>
flowParticipant

配好有就可以选择数据啦

第二步对接接口

作用

接口名称

参数

返回值

获取审批列表

GetApprovalList

1.(string)userdata

2.(int)page

3.(int)pagesize

4.(int)isOver

5.(string)

flowLevel

6.(string)where

Dynamic->JsonData

 

 

获取审批列表汇总信息

LoadApprovalListSummary

1.(string)userData

Dynamic->JsonData

 

初始化流程状态

InitFlowState

1.string userData

2.string flowNo

3.int appID

4.string formHtml

5.string formData

6.string formUrl

Dynamic->

status = ?

flowID = ?

获取当前步骤信息

GetCurrentStepInfo

1.string userData

2.int approvalID = 0

3.int? flowID = 0

4.int? appID = 0

Dynamic ->

{

status = ?

stepData =?

isBack = ?

isTurnRead =? isTurnRead=?

isTurnDo = ?

};

获取审批参与者

FindFlowApprovers

1.string userData

2.int flowID

3.int approvalID

4. int appID

5. string toNodeID = ""

Dynamic ->{

status = ?

data = ?

}

获取审批意见

GetApprovalOpinions

  1. int flowID
  2. int appID

Dynamic ->

{

data = ?

}

获取下个节点(所有)

GetNextFlowNodes

1.int flowID

2.int appID

3.int approvalID

Dynamic ->

{

status = ?

 data = ?

 }

获取决策方案

GetFlowDecisionModes

  1. int flowID
  2. int appID
  3. int approvalID

Dynamic ->

{

status = ?

 data = ?

 }

流转主要功能接口

FlowAction

1.string userData

2.string actionType

3.int stateID

4.int approvalID

5.int appID;

6.bool isPass

7.string opinion

8.string formName

9.string participantJson                10.string participantValue                11.int level                12.int turnToDoID = 0

Dynamic ->

{

status = ?

 data = ?

 }

获取待阅

列表数据

GetTurnToReadPageList

1.string userData

2.int page                3.int pagesize

4.int isRead

5.string where

Dynamic->JsonData

查找传阅参与者

FindFlowTurnToReaders

1.string userData,

2.int flowID,

3.string nodeID

Dynamic ->

{

status = ?,

data = ?

 }

浏览传阅表单

ReadApprovalForm

1.tring userData

2.int approvalID

Dynamic ->

{

status = ?

}

获取传阅数据

GetTurnToReadList

int stateID

Dynamic->JsonData

获取代办参与者数据

FindFlowTurnToApprovers

  1. string userData
  2.  int flowID
  3.  string nodeID

Dynamic ->

{

status = ?,

data=?

 }

获取代办数据

GetTurnToDoPageList

1.string userData

2.int pag                3.int pagesize                 4.int isOver                 5.string where

Dynamic->JsonData

获取流程图流转标记

GetFlowElementMarked

1.int flowID

2. int appID

Dynamic ->

{

status = ?,

data=?

 }

 第三步骤 signalr对接

 ...........

相关博文

posted @ 2017-10-27 09:01  Taffy++  阅读(2594)  评论(0编辑  收藏  举报