cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti process decisions listener

jfelix
Champ in-the-making
Champ in-the-making
Hi guys,

I am currently trying to use Activiti in a way that it allows me to control all processes' decisions (expressions evaluation, transitions, etc) without having to define inner-process listeners.
This means that I do not want to define listeners inside the processes to monitorize their workflow, I want something like overriding the default Activiti listeners (or add a new one)  in order to allow my application to communicate with active processes and control their decisions.

Can anyone help me with this?

Thanks in advance Smiley Happy
3 REPLIES 3

logic3
Champ in-the-making
Champ in-the-making
You could do this by implementing a custom BpmnParseListener and registering it via activiti.cfg.xml (property customPostBPMNParseListeners). This allows you to attach listeners to you process externally and you do not need to define them with in the process.

An example of the BPMNParseListener approach to add listeners:

http://svn.alfresco.com/repos/alfresco- … tener.java

I hope this is what you are looking for

jfelix
Champ in-the-making
Champ in-the-making
Hi, thanks for the reply!

I think I have not explained myself properly.

You idea suggests that my BpmnParseListener would be called by the Activiti engine after a decision over some process flow.

What I want is, for example, to implement an ExpressionManager that allows me to evaluate process expressions without having to use jUEL.
For that, I would have an ELResolver that knows how to deal with my own application's objects.

jbarrez
Star Contributor
Star Contributor
What I want is, for example, to implement an ExpressionManager that allows me to evaluate process expressions without having to use jUEL.
For that, I would have an ELResolver that knows how to deal with my own application's objects.

The expressionManager is (in theory at least) pluggable: it is injectable in the ProcessEngineConfigurationImpl. So you can inject your own (ie with Spring) or subclass that class with your own configuration.