Boris Terzic
Boris Terzic

Reputation: 10948

Best approach to intercept task creation in Activiti for updating a parallel search index?

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.

Upvotes: 1

Views: 413

Answers (2)

Rafael Cordones
Rafael Cordones

Reputation: 831

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

Upvotes: 0

RoiG
RoiG

Reputation: 478

I have written a post about this. Check out http://developer4life.blogspot.com/2012/02/extending-task-service-in-activiti.html

Upvotes: 1

Related Questions