1.实现SPI接口
import pro.shushi.pamirs.meta.common.spi.SPI;
import pro.shushi.pamirs.meta.common.spi.factory.SpringServiceLoaderFactory;
import pro.shushi.pamirs.workflow.app.api.entity.WorkflowContext;
import pro.shushi.pamirs.workflow.app.api.model.WorkflowInstance;
@SPI(factory = SpringServiceLoaderFactory.class)
public interface WorkflowEndNoticeApi {
void execute(WorkflowContext context, WorkflowInstance instance);
}
自定义通知逻辑
/**
* 自定义扩展流程结束时扩展点
*/
@Order(999)
@Component
@SPI.Service
public class MyWorkflowEndNoticeApi implements WorkflowEndNoticeApi {
@Override
public void execute(WorkflowContext context, WorkflowInstance instance) {
Long dataBizId = instance.getDataBizId();
//todo自定义逻辑
}
}
Oinone社区 作者:数式-海波原创文章,如若转载,请注明出处:https://doc.oinone.top/backend/4979.html
访问Oinone官网:https://www.oinone.top获取数式Oinone低代码应用平台体验