在 Activiti 中拦截任务创建以更新并行搜索索引的最佳方法?
我们将 Activiti 嵌入到应用程序中,并且对搜索超出 Activiti 开箱即用的任务查询功能的任务有一些特定要求。我目前正在考虑集成 ElasticSearch 并维护专门的任务索引。为此,我需要拦截 Activiti 中的任务创建。
我还没有找到一个“原生”且透明的(因为我不必在我的工作流程中显式地建模)Activiti 机制(如拦截器机制)。目前我最好的选择是编写一个 myBatis 拦截器插件。
在我承诺这一点之前,我想确保我没有错过更干净/更简单的方法。
We are embedding Activiti in an application and have some specific requirements towards searching for tasks that go beyond the out of the box Task query capabilities of Activiti. I'm currently considering integrating ElasticSearch and maintaining a specialized index of tasks. For that to work I need to intercept task creation in Activiti.
I haven't found a "native" and transparent (in that I should not have to explicitly model this into my workflows) Activiti mechanism for this (like an interceptor mechanism). At the moment my best bet looks to be to write an myBatis intercepter plugin.
Before I commit to this I wanted to make sure I'm not missing a cleaner/easier method.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我已经写了一篇关于此的文章。查看 http://developer4life.blogspot.com/2012 /02/extending-task-service-in-activiti.html
I have written a post about this. Check out http://developer4life.blogspot.com/2012/02/extending-task-service-in-activiti.html
如果您使用 CDI (Weld),请查看 Activiti 用户指南的“接收进程事件”部分: http://activiti.org/userguide/index.html#N12DA5
If you are using CDI (Weld), have a look at the Activiti User Guide, section "Receiving Process Events": http://activiti.org/userguide/index.html#N12DA5