Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新增自定义服务含流程,在流程中配置任务监听器为Java类时,会提示监听器无法实例化错误 #189

Closed
nixgnail opened this issue Nov 12, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@nixgnail
Copy link

基本信息

  • ruoyi-vue-pro 版本:yudao-cloud 最新版
  • 操作系统:win11 X64
  • 数据库:)Oracle 19

问题描述

新增自定义服务,开发对应的【业务表单】工作流,最后一个节点配置任务监听器,类型为Java类,如下图所示:
image

开发的监听器如下:
image
流程执行时出现,无法实例化监听器,也就是找不到监听器,初步猜测是路径问题,找不到这个类:
(网上说Flowable寻找监听器的优先寻找路径为org.flowable,找不到再从root目录下寻找)
Snipaste_2024-11-12_11-49-38
Snipaste_2024-11-12_11-51-14
Snipaste_2024-11-12_11-51-49

另一种尝试

尝试将同样的监听器放置于Bpm对应的路径下(cn.yudao.module.bpm.framework.flowable.core.listener.demo.task.DemoDelegateClassTaskListener),完全正常。
但是在BPM服务中,DemoDelegateClassTaskListener监听器获取到的DelegateTask对象中不包含BusinessKey。我的目的是通过监听器更新业务表的状态。

期望效果

我的目标是在对应的业务服务中定义监听器来更新状态,而不是在BPM模板中实现所有的监听器(这样需要写其他服务的处理接口),请问应该如何修改监听器,或者另一种方式实现流程审批结束对业务表单状态的同步更新。

@YunaiV
Copy link
Owner

YunaiV commented Nov 22, 2024

https://cloud.iocoder.cn/bpm/listener/

看我文档里说的哈。

@YunaiV YunaiV self-assigned this Nov 22, 2024
@YunaiV YunaiV added the question Further information is requested label Nov 22, 2024
@YunaiV YunaiV closed this as completed Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants