BPM: 实现业务流程结果监听器

This commit is contained in:
puhui999
2024-02-01 00:45:29 +08:00
parent acb8d3f23b
commit 624b35988e
10 changed files with 147 additions and 8 deletions

View File

@ -0,0 +1,26 @@
package cn.iocoder.yudao.module.bpm.api.listener;
import cn.iocoder.yudao.module.bpm.api.listener.dto.BpmResultListenerRespDTO;
/**
* 业务流程实例的结果发生变化的监听器 Api
*
* @author HUIHUI
*/
public interface BpmResultListenerApi {
/**
* 监听的流程定义 Key
*
* @return 返回监听的流程定义 Key
*/
String getProcessDefinitionKey();
/**
* 处理事件
*
* @param event 事件
*/
void onEvent(BpmResultListenerRespDTO event);
}

View File

@ -0,0 +1,31 @@
package cn.iocoder.yudao.module.bpm.api.listener.dto;
import lombok.Data;
/**
* 业务流程实例的结果 Response DTO
*
* @author HUIHUI
*/
@Data
public class BpmResultListenerRespDTO {
/**
* 流程实例的编号
*/
private String id;
/**
* 流程实例的 key
*/
private String processDefinitionKey;
/**
* 流程实例的结果
*/
private Integer result;
/**
* 流程实例对应的业务标识
* 例如说,请假
*/
private String businessKey;
}