最新消息:

JS API(PC、Touch)

开发文档 admin 2023浏览

Extjs开发工作流API

基于WB7开发可以在IDE中直接输入XipWf. 就会提示出工作流API的方法。如果基于Extjs原生开发需要引入/xip/js/xipWf.js

1、根据待办Id为审批页面动态创建审批按钮

XipWf.createButtonsByTaskId
参数:
taskId 待办Id
textArea 审批意见组件
insCode 流程实例编码
bizId 业务主键Id
返回按钮数组

2、根据流程编码创建流程实例

XipWf.createInstanceByProcess
参数:
processCode 流程编码
callback 回调函数 实例创建成功返回{flag:0,instanceCode:’xxxx’}否则{flag:1,msg:’xxxx’}

3、根据流程实体编码创建流程实例

XipWf.createInstanceByEntity
参数:
entityCode 实体编码
params 实体属性值Json {attr1Name:’attr1Value’,attr2Name:’attr2Value’}
callback 回调函数 正确:{flag:0, instanceCode:’xxx’} 错误:{flag:1, msg:’xxx’}

4、提交流程实例

XipWf.submitInstance
参数:
instanceCode 流程实例编码
params 实体属性值Json {attr1Name:’attr1Value’,attr2Name:’attr2Value’}
callback 回调函数 提交成功返回 {flag:0,instanceCode:’xxxx’} 否则返回{flag:1,msg:’xxxx’}

5、根据流程编码启动并提交流程

XipWf.startAndSubmitByProcess
参数:
processCode 流程编码
params 实体属性值对Json {attr1Name:’attr1Value’,attr2Name:’attr2Value’}
callback 回调函数,如果成功返回{flag:0,instanceCode:’xxxx’} 否则返回{flag:1,msg:’xxxx’}

6、根据实例编码启动并提交流程

XipWf.startAndSubmitByEntity
参数:
entityCode 业务实体编码
params 实体属性值对Json {attr1Name:’attr1Value’,attr2Name:’attr2Value’}
callback 回调函数 如果启动并提交成功返回{flag:0,instanceCode:’xxxx’} 否则返回{flag:1,msg:’xxxx’}

7、根据流程编码重启流程实例

XipWf.restartInstanceByProcess
参数:
instanceCode 流程实例Code
processCode 流程编码 如果不传processCode 则按照原流程重启
callback 回调函数 重启流程实例成功返回{flag:0,msg:’xxxx’}否则返回{flag:1,msg:’xxxx’}

8、根据实体编码重启流程实例

XipWf.restartInstanceByEntity
参数:
instanceCode 实例编码
entityCode 实体编码
params 实体属性值对Json {attr1Name:’attr1Value’,attr2Name:’attr2Value’}
callback 回调函数 重启流程实例成功返回{flag:0,msg:’xxxx’}否则返回{flag:1,msg:’xxxx’}

9、根据流程编码重启流程实例并提交

XipWf.restartAndSubmitByProcess
参数:
instanceCode 流程实例Code
processCode 流程编码 如果不传processCode 则按照原流程重启
params 实体属性值对Json {attr1Name:’attr1Value’,attr2Name:’attr2Value’}
callback 回调函数,重启成功返回{flag:0,instanceCode:’xxxx’}否则{flag:1,msg:’xxxx’}

10、根据流程实体编码重启流程实例并提交

XipWf.restartAndSubmitByEntity
参数:
instanceCode 实例编码
entityCode 实体编码
params 实体属性值对Json {attr1Name:’attr1Value’,attr2Name:’attr2Value’}
callback 回调函数,重启成功返回{flag:0,instanceCode:’xxxx’}否则{flag:1,msg:’xxxx’}

11、根据实例编码撤回流程实例

XipWf.revokeByInstance
参数:
instanceCode 流程实例编码
callback 回调函数如果成功返回{flag:0,msg:’xxxx’} 否则返回{flag:1,msg:’xxxx’}

12、审批历史记录查询

XipWf.showMonitorPage
参数:
insCode 流程实例编码

13、设置流程实例属性值

XipWf.setInstanceEntityAttrValue
参数:
instanceCode 流程实例编码
entityAttrs 实体属性值对Json {attr1Name:’attr1Value’,attr2Name:’attr2Value’}
callBack 回调函数 如果设置实例属性成功,返回{flag:0,msg:’xxxx’} 否则{flag:1,msg:’xxxx’}

Touch开发工作流API

基于WB7开发可以在IDE中直接输入XipWf. 就会提示出工作流API的方法。如果基于Touch原生开发需要引入/xip/js/xipWfTouch.js

1、根据待办Id为审批页面动态创建审批按钮

XipWf.createButtonsByTaskId
参数:
taskNaviView 需要手工选人的时候,选择审批人的界面被推入的导航视图
bntContainer 审批按钮的容器
taskId 待办的ID
descObj 审批意见录入控件

2、根据流程编码创建流程实例

XipWf.createInstanceByProcess
参数:
processCode 流程编码
callback 回调函数,实例创建成功返回{flag:0,instanceCode:’xxxx’}否则{flag:1,msg:’xxxx’}

3、根据流程实体编码创建流程实例

XipWf.createInstanceByEntity
参数:
taskNaviView 选择审批流程的界面被推入的导航视图
entityCode 实体编码
entityAttrs 实体属性值Json {attr1Name:’attr1Value’,attr2Name:’attr2Value’}
callBack 回调函数,实例创建成功返回{flag:0,instanceCode:’xxxx’}否则{flag:1,msg:’xxxx’}

4、提交流程实例

XipWf.submitInstance
参数:
taskNaviView 需要手工选人的时候,选择审批人的界面被推入的导航视图
instanceCode 流程实例编码
entityAttrs 实体属性值对Json {attr1Name:’attr1Value’,attr2Name:’attr2Value’}
callBack 回调函数 提交成功返回 {flag:0,instanceCode:’xxxx’} 否则返回{flag:1,msg:’xxxx’}

5、根据流程编码启动并提交流程

XipWf.startAndSubmitByProcess
参数:
taskNaviView 需要手工选人的时候,选择审批人的界面被推入的导航视图
processCode 流程编码
entityAttrs 实体属性值对Json {attr1Name:’attr1Value’,attr2Name:’attr2Value’}
callBack 回调函数,如果成功返回{flag:0,instanceCode:’xxxx’} 否则返回{flag:1,msg:’xxxx’}

6、根据实例编码启动并提交流程

XipWf.startAndSubmitByEntity
参数:
taskNaviView 需要手工选人的时候,选择审批人的界面被推入的导航视图
entityCode 业务实体编码
entityAttrs 实体属性值对Json {attr1Name:’attr1Value’,attr2Name:’attr2Value’}
callBack 回调函数如果成功返回{flag:0,instanceCode:’xxxx’} 否则返回{flag:1,msg:’xxxx’}

7、根据流程Id重启流程实例

XipWf.restartInstanceByProcess
参数:
instanceCode 流程实例编码
processCode 流程编码,如果此参数为空则使用实例原来对应的流程进行重启
callBack 回调函数 重启流程实例成功返回{flag:0,msg:’xxxx’}否则返回{flag:1,msg:’xxxx’}

8、根据实体编码重启流程实例

XipWf.restartInstanceByEntity
参数:
taskNaviView 选择流程的界面被推入的导航视图
instanceCode 流程实例编码
entityCode 流程实例编码
entityAttrs 实体属性值对Json {attr1Name:’attr1Value’,attr2Name:’attr2Value’}
callBack 回调函数 重启流程实例成功返回{flag:0,msg:’xxxx’}否则返回{flag:1,msg:’xxxx’}

9、根据流程Id重启流程实例并提交

XipWf.restartAndSubmitByProcess
参数:
taskNaviView 需要手工选人的时候,选择审批人的界面被推入的导航视图
instanceCode 流程实例编码
processCode 流程编码,如果此参数为空则使用实例原来对应的流程进行重启
entityAttrs 实体属性值对Json {attr1Name:’attr1Value’,attr2Name:’attr2Value’}
callBack 回调函数,重启成功返回{flag:0,instanceCode:’xxxx’}否则{flag:1,msg:’xxxx’}

10、根据流程实体编码重启流程实例并提交

XipWf.restartAndSubmitByEntity
参数:
taskNaviView 需要手工选人的时候,选择审批人的界面被推入的导航视图
instanceCode 流程实例编码
entityCode 流程实体编码
entityAttrs 实体属性值对Json {attr1Name:’attr1Value’,attr2Name:’attr2Value’}
callBack 回调函数,重启成功返回{flag:0,instanceCode:’xxxx’}否则{flag:1,msg:’xxxx’}

11、根据实例编码撤回流程实例

XipWf.revokeByInstance
参数:
instanceCode 流程实例编码
callBack 回调函数如果成功返回{flag:0,msg:’xxxx’} 否则返回{flag:1,msg:’xxxx’}

12、审批历史记录查询

XipWf.showMonitorPage
参数:
taskNaviView 审批历史记录容器将被推入到该导航条内显示
instanceCode 流程实例编码

13、设置流程实例属性值

XipWf.setInstanceEntityAttrValue
参数:
instanceCode 流程实例编码
entityAttrs 实体属性值对Json {attr1Name:’attr1Value’,attr2Name:’attr2Value’}
callBack 回调函数 如果设置实例属性成功,返回{flag:0,msg:’xxxx’} 否则{flag:1,msg:’xxxx’}

转载请注明:兴竹集成开发平台 » JS API(PC、Touch)