package cn.iocoder.yudao.module.bpm.api.event;
|
|
import jakarta.validation.constraints.NotNull;
|
import lombok.Data;
|
import org.springframework.context.ApplicationEvent;
|
|
/**
|
* 流程实例的状态(结果)发生变化的 Event
|
*
|
* @author 超级管理员
|
*/
|
@SuppressWarnings("ALL")
|
@Data
|
public class BpmProcessInstanceStatusEvent extends ApplicationEvent {
|
|
/**
|
* 流程实例的编号
|
*/
|
@NotNull(message = "流程实例的编号不能为空")
|
private String id;
|
/**
|
* 流程实例的 key
|
*/
|
@NotNull(message = "流程实例的 key 不能为空")
|
private String processDefinitionKey;
|
/**
|
* 流程所属分类。
|
* 业务模块监听审批结果时,优先按分类匹配:同一个业务分类下可能存在多个流程定义 Key,
|
* 例如采购申请分类 purchase_request_approve 下既有标准 Key,也有历史遗留的自定义 Key。
|
*/
|
private String processDefinitionCategory;
|
/**
|
* 流程实例的结果
|
*/
|
@NotNull(message = "流程实例的状态不能为空")
|
private Integer status;
|
/**
|
* 流程实例结束的原因
|
*/
|
private String reason;
|
|
/**
|
* 流程实例对应的业务标识
|
* 例如说,请假
|
*/
|
private String businessKey;
|
|
public BpmProcessInstanceStatusEvent(Object source) {
|
super(source);
|
}
|
|
}
|