BPM:增加任务监听器、执行监听器的管理
This commit is contained in:
parent
889b9406b8
commit
6d44bf0d7a
@ -1,6 +1,8 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.listener;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.validation.InEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@ -21,4 +23,8 @@ public class BpmProcessListenerPageReqVO extends PageParam {
|
||||
@Schema(description = "监听事件", example = "start")
|
||||
private String event;
|
||||
|
||||
@Schema(description = "状态", example = "1")
|
||||
@InEnum(CommonStatusEnum.class)
|
||||
private Integer status;
|
||||
|
||||
}
|
@ -20,6 +20,7 @@ public interface BpmProcessListenerMapper extends BaseMapperX<BpmProcessListener
|
||||
.likeIfPresent(BpmProcessListenerDO::getName, reqVO.getName())
|
||||
.eqIfPresent(BpmProcessListenerDO::getType, reqVO.getType())
|
||||
.eqIfPresent(BpmProcessListenerDO::getEvent, reqVO.getEvent())
|
||||
.eqIfPresent(BpmProcessListenerDO::getStatus, reqVO.getStatus())
|
||||
.orderByDesc(BpmProcessListenerDO::getId));
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ import org.springframework.stereotype.Component;
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class DemoDelegateClassExecutionListener implements TaskListener {
|
||||
public class DemoDelegateClassTaskListener implements TaskListener {
|
||||
|
||||
@Override
|
||||
public void notify(DelegateTask delegateTask) {
|
@ -3,14 +3,16 @@ package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener.demo.task;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.flowable.engine.delegate.TaskListener;
|
||||
import org.flowable.task.service.delegate.DelegateTask;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 类型为 delegateExpression 的 TaskListener 监听器示例
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class DemoDelegateExpressionExecutionListener implements TaskListener {
|
||||
public class DemoDelegateExpressionTaskListener implements TaskListener {
|
||||
|
||||
@Override
|
||||
public void notify(DelegateTask delegateTask) {
|
@ -1,7 +1,6 @@
|
||||
package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener.demo.task;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.flowable.engine.delegate.TaskListener;
|
||||
import org.flowable.task.service.delegate.DelegateTask;
|
||||
|
||||
/**
|
||||
@ -10,7 +9,7 @@ import org.flowable.task.service.delegate.DelegateTask;
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Slf4j
|
||||
public class DemoSpringExpressionExecutionListener {
|
||||
public class DemoSpringExpressionTaskListener {
|
||||
|
||||
public void notify(DelegateTask delegateTask) {
|
||||
log.info("[execute][task({}) 被调用]", delegateTask.getId());
|
Loading…
Reference in New Issue
Block a user