Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
workflow-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
workflow-platform
Commits
9d273089
Commit
9d273089
authored
Jun 01, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改部分pom
parent
eb902629
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
16 deletions
+21
-16
workflow-engine/src/main/java/com/mortals/flowable/listener/ProcessInstanceCompleteListener.java
...ls/flowable/listener/ProcessInstanceCompleteListener.java
+2
-1
workflow-engine/src/main/java/com/mortals/flowable/listener/ProcessInstanceStartListener.java
...rtals/flowable/listener/ProcessInstanceStartListener.java
+2
-1
workflow-engine/src/main/java/com/mortals/flowable/listener/global/GlobalTaskCreateListener.java
...ls/flowable/listener/global/GlobalTaskCreateListener.java
+17
-12
workflow-engine/src/main/java/com/mortals/flowable/service/FlowTaskServiceImpl.java
...ava/com/mortals/flowable/service/FlowTaskServiceImpl.java
+0
-2
No files found.
workflow-engine/src/main/java/com/mortals/flowable/listener/ProcessInstanceCompleteListener.java
View file @
9d273089
package
com.mortals.flowable.listener
;
import
lombok.extern.apachecommons.CommonsLog
;
import
lombok.extern.slf4j.Slf4j
;
import
org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent
;
import
org.flowable.common.engine.api.delegate.event.FlowableEvent
;
import
org.flowable.engine.FormService
;
...
...
@@ -18,7 +19,7 @@ import java.util.Map;
* @description:
**/
//@Component
@
CommonsLog
@
Slf4j
public
class
ProcessInstanceCompleteListener
extends
AbstractFlowableEngineEventListener
{
@Autowired
...
...
workflow-engine/src/main/java/com/mortals/flowable/listener/ProcessInstanceStartListener.java
View file @
9d273089
package
com.mortals.flowable.listener
;
import
lombok.extern.apachecommons.CommonsLog
;
import
lombok.extern.slf4j.Slf4j
;
import
org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent
;
import
org.flowable.common.engine.api.delegate.event.FlowableEvent
;
import
org.flowable.engine.FormService
;
...
...
@@ -19,7 +20,7 @@ import java.util.Map;
* @description:
**/
//@Component
@
CommonsLog
@
Slf4j
public
class
ProcessInstanceStartListener
extends
AbstractFlowableEngineEventListener
{
@Autowired
private
TaskService
taskService
;
...
...
workflow-engine/src/main/java/com/mortals/flowable/listener/global/GlobalTaskCreateListener.java
View file @
9d273089
...
...
@@ -13,6 +13,7 @@ import com.mortals.xhx.module.platform.service.PlatformListenerService;
import
com.mortals.xhx.module.platform.service.PlatformModelinfoService
;
import
com.mortals.xhx.module.platform.service.PlatformService
;
import
lombok.extern.apachecommons.CommonsLog
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent
;
...
...
@@ -44,11 +45,13 @@ import java.util.stream.Collectors;
* @date: 2021/9/9 11:48
*/
@Component
@
CommonsLog
@
Slf4j
public
class
GlobalTaskCreateListener
extends
AbstractFlowableEngineEventListener
{
public
static
String
TaskCreate
=
"2"
;
public
static
String
TaskComplete
=
"4"
;
@Autowired
private
TaskService
taskService
;
@Autowired
...
...
@@ -63,27 +66,18 @@ public class GlobalTaskCreateListener extends AbstractFlowableEngineEventListene
@Override
protected
void
taskCreated
(
FlowableEngineEntityEvent
event
)
{
log
.
info
(
"进入任务创建全局监听"
);
List
<
String
>
userNameList
=
new
ArrayList
<>();
FlowableEntityEventImpl
flowableEntityEvent
=
(
FlowableEntityEventImpl
)
event
;
TaskEntity
taskEntity
=
(
TaskEntity
)
(
flowableEntityEvent
).
getEntity
();
if
(!
ObjectUtils
.
isEmpty
(
taskEntity
.
getParentTaskId
()))
{
log
.
info
(
"当前任务为子任务"
);
return
;
}
String
taskId
=
taskEntity
.
getId
();
String
scopeType
=
taskEntity
.
getScopeType
();
log
.
info
(
String
.
format
(
"任务类型:%s"
,
scopeType
));
String
scopeId
=
taskEntity
.
getScopeId
();
HistoricProcessInstance
historicProcessInstance
=
historyService
.
createHistoricProcessInstanceQuery
().
processInstanceId
(
taskEntity
.
getProcessInstanceId
()).
singleResult
();
if
(
historicProcessInstance
==
null
)
{
log
.
info
(
"historicProcessInstance is null!"
);
return
;
...
...
@@ -94,9 +88,7 @@ public class GlobalTaskCreateListener extends AbstractFlowableEngineEventListene
log
.
info
(
"idList is null!"
);
}
log
.
info
(
"idList:"
+
JSON
.
toJSONString
(
idList
));
// 获取接收人,区分审核人,候选组,并行等 todo
idList
.
forEach
(
identityLink
->
{
if
(
StringUtils
.
isNotBlank
(
identityLink
.
getUserId
()))
{
...
...
@@ -162,6 +154,19 @@ public class GlobalTaskCreateListener extends AbstractFlowableEngineEventListene
@Override
protected
void
taskCompleted
(
FlowableEngineEntityEvent
event
)
{
log
.
info
(
"进入任务完成全局监听"
);
FlowableEntityEventImpl
flowableEntityEvent
=
(
FlowableEntityEventImpl
)
event
;
TaskEntity
taskEntity
=
(
TaskEntity
)
(
flowableEntityEvent
).
getEntity
();
if
(!
ObjectUtils
.
isEmpty
(
taskEntity
.
getParentTaskId
()))
{
log
.
info
(
"当前任务为子任务"
);
return
;
}
// String taskId = taskEntity.getId();
// Object flowPerson = taskEntity.getVariable("flowPerson");
log
.
info
(
"taskId:{},taskName:{}"
,
taskEntity
.
getId
(),
taskEntity
.
getName
());
super
.
taskCompleted
(
event
);
}
...
...
workflow-engine/src/main/java/com/mortals/flowable/service/FlowTaskServiceImpl.java
View file @
9d273089
...
...
@@ -475,8 +475,6 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IApiFlowT
flowTask
.
setAttachmentList
(
attachmentEntities
);
hisFlowList
.
add
(
flowTask
);
}
//查询当前任务是否存在子任务
List
<
HistoricTaskInstance
>
subList
=
historyService
.
createHistoricTaskInstanceQuery
()
.
taskParentTaskId
(
histIns
.
getTaskId
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment