Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzwf
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzwf
提交
6671b17d
提交
6671b17d
编写于
8月 21, 2020
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
工作流批量执行
上级
1afd2d0c
变更
2
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
55 行增加
和
1 行删除
+55
-1
WFCoreService.java
...izlab/core/workflow/extensions/service/WFCoreService.java
+21
-0
WFCoreResource.java
...n/java/cn/ibizlab/api/rest/extensions/WFCoreResource.java
+34
-1
未找到文件。
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/extensions/service/WFCoreService.java
浏览文件 @
6671b17d
...
...
@@ -228,6 +228,27 @@ public class WFCoreService
return
new
PageImpl
<
WFTask
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
public
List
<
WFTaskWay
>
getWFLinkByStep
(
String
system
,
String
appname
,
String
entity
,
String
processDefinitionKey
,
String
taskDefinitionKey
)
{
List
<
WFTaskWay
>
taskWays
=
new
ArrayList
<>();
if
((!
StringUtils
.
isEmpty
(
processDefinitionKey
))&&(!
StringUtils
.
isEmpty
(
taskDefinitionKey
)))
{
UserTask
userTask
=
wfModelService
.
getModelStepByKey
(
processDefinitionKey
).
get
(
taskDefinitionKey
);
if
(
userTask
!=
null
&&
userTask
.
getOutgoingFlows
()!=
null
)
{
for
(
SequenceFlow
sequenceFlow:
userTask
.
getOutgoingFlows
())
{
WFTaskWay
way
=
new
WFTaskWay
();
way
.
setSequenceflowid
(
sequenceFlow
.
getId
());
way
.
setSequenceflowname
(
sequenceFlow
.
getName
());
way
.
setProcessdefinitionkey
(
processDefinitionKey
);
way
.
setTaskdefinitionkey
(
taskDefinitionKey
);
taskWays
.
add
(
way
);
}
}
}
return
taskWays
;
}
public
String
getTaskUrl
(
String
type
,
String
processDefinitionKey
,
String
processInstanceId
,
String
businessKey
,
String
taskDefinitionKey
)
{
JSONObject
app
=
ibzuaaFeignClient
.
getAppSwitcher
(
"default"
,
AuthenticationUser
.
getAuthenticationUser
().
getUserid
());
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/rest/extensions/WFCoreResource.java
浏览文件 @
6671b17d
...
...
@@ -68,6 +68,14 @@ public class WFCoreResource
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfCoreService
.
getWFLink
(
system
,
appname
,
entity
,
businessKey
,
taskDefinitionKey
));
}
@ApiOperation
(
value
=
"getWayByProcessDefinitionKey"
,
tags
=
{
"WFStepWay"
},
notes
=
"根据流程和当前步骤获取操作路径"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/{system}-app-{appname}/{entity}/process-definitions/{processDefinitionKey}/usertasks/{taskDefinitionKey}/ways"
)
public
ResponseEntity
<
List
<
WFTaskWay
>>
getWayByDefKey
(
@PathVariable
(
"system"
)
String
system
,
@PathVariable
(
"appname"
)
String
appname
,
@PathVariable
(
"entity"
)
String
entity
,
@PathVariable
(
"processDefinitionKey"
)
String
processDefinitionKey
,
@PathVariable
(
"taskDefinitionKey"
)
String
taskDefinitionKey
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfCoreService
.
getWFLinkByStep
(
system
,
appname
,
entity
,
processDefinitionKey
,
taskDefinitionKey
));
}
@ApiOperation
(
value
=
"getWayByTaskId"
,
tags
=
{
"WFTaskWay"
},
notes
=
"根据业务主键和当前步骤获取操作路径"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/{system}-app-{appname}/{entity}/{businessKey}/tasks/{taskId}/ways"
)
public
ResponseEntity
<
List
<
WFTaskWay
>>
gettasklink
(
@PathVariable
(
"system"
)
String
system
,
@PathVariable
(
"appname"
)
String
appname
,
...
...
@@ -87,7 +95,7 @@ public class WFCoreResource
}
//@PreAuthorize("hasPermission(#entity,'WFSTART',this.getEntity())")
@ApiOperation
(
value
=
"wfsubmit"
,
tags
=
{
"
WFProcessInstance
"
},
notes
=
"工作流执行步骤"
)
@ApiOperation
(
value
=
"wfsubmit"
,
tags
=
{
"
Submit
"
},
notes
=
"工作流执行步骤"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/{system}-app-{appname}/{entity}/{businessKey}/tasks/{taskId}"
)
public
ResponseEntity
<
WFProcessInstance
>
wfsubmit
(
@PathVariable
(
"system"
)
String
system
,
@PathVariable
(
"appname"
)
String
appname
,
@PathVariable
(
"entity"
)
String
entity
,
...
...
@@ -97,6 +105,31 @@ public class WFCoreResource
return
ResponseEntity
.
ok
(
wfCoreService
.
wfsubmit
(
system
,
appname
,
entity
,
businessKey
,
taskId
,
taskWay
));
}
//@PreAuthorize("hasPermission(#entity,'WFSTART',this.getEntity())")
@ApiOperation
(
value
=
"wfsubmitbatch"
,
tags
=
{
"SubmitBatch"
},
notes
=
"批量工作流执行步骤"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/{system}-app-{appname}/{entity}/process-definitions/{processDefinitionKey}/usertasks/{taskDefinitionKey}/ways/{sequenceFlowId}/submit"
)
public
ResponseEntity
<
Boolean
>
wfsubmit
(
@PathVariable
(
"system"
)
String
system
,
@PathVariable
(
"appname"
)
String
appname
,
@PathVariable
(
"entity"
)
String
entity
,
@PathVariable
(
"processDefinitionKey"
)
String
processDefinitionKey
,
@PathVariable
(
"taskDefinitionKey"
)
String
taskDefinitionKey
,
@PathVariable
(
"sequenceFlowId"
)
String
sequenceFlowId
,
@RequestBody
List
<
Map
>
businessList
)
{
WFProcessInstance
instance
=
new
WFProcessInstance
();
businessList
.
forEach
(
business
->
{
if
(
business
.
get
(
"srfkey"
)==
null
)
return
;
String
businessKey
=
business
.
get
(
"srfkey"
).
toString
();
wfCoreService
.
getWFLink
(
system
,
appname
,
entity
,
businessKey
,
taskDefinitionKey
).
forEach
(
way
->{
if
(
way
.
getSequenceflowid
().
equals
(
sequenceFlowId
))
{
way
.
set
(
"activedata"
,
business
);
wfCoreService
.
wfsubmit
(
system
,
appname
,
entity
,
businessKey
,
way
.
getTaskid
(),
way
);
}
});
});
return
ResponseEntity
.
ok
(
true
);
}
@ApiOperation
(
value
=
"getBusinessKeys"
,
tags
=
{
"String"
},
notes
=
"根据流程步骤查询我的待办主键清单"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/{system}-app-{appname}/{entity}/process-definitions/{processDefinitionKey}/usertasks/{taskDefinitionKey}/tasks"
)
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录