cancel
Showing results for 
Search instead for 
Did you mean: 

How to listen to process instance activity ?

wir33658
Champ in-the-making
Champ in-the-making
Hi, is there any possibility to add a listener to a process instance, so I can act on what ever is going on. (Somehow I need to hook in to do some automated stuff).

Cheers, Rob.
10 REPLIES 10

jbarrez
Star Contributor
Star Contributor
Hi Rob,

Adding listeners to process execution events is something that is a must for Tom, so I'm sure it will be implemented in the next months.
The problem is there is no BPMN 2.0 compliant thing to do this, so we are currently still investigating what would be the best approach to do this.

Joram

wir33658
Champ in-the-making
Champ in-the-making
Hi Rob,

Adding listeners to process execution events is something that is a must for Tom, so I'm sure it will be implemented in the next months.
The problem is there is no BPMN 2.0 compliant thing to do this, so we are currently still investigating what would be the best approach to do this.

Joram

Hi, hm, you mention BPMN, but I am thinking of adding listeners to the process machine/engine to get every state changed on a process instance (not events which I would need to set up in the model, e.g. BPMN).

Cheers, Rob.

tombaeyens
Champ in-the-making
Champ in-the-making
that will come as a process event bus.  first ideas should hopefully make it in the next release.

wir33658
Champ in-the-making
Champ in-the-making
that will come as a process event bus.  first ideas should hopefully make it in the next release.

Sounds great, thanks for the update on this one.

wir33658
Champ in-the-making
Champ in-the-making
Old subject, but I checked the recent state of the project and cannot point out such a event-bus. I hope that there is something like this meanwhile and someone can point it out to me (a little example would be very helpful).

(Something like "processInstance.addListener(…)" 😉 ? )

Cheers, Rob.

jbarrez
Star Contributor
Star Contributor
the process event bus never made it into the code.
You can however define process instance listeners to your process: http://activiti.org/userguide/index.html#executionListeners.
If you want a global listener for all process instances, you need to use a ParseListener and hook it into the BpmnParser.

wir33658
Champ in-the-making
Champ in-the-making
How do I get access to the BpmnParser ? I checked the API (http://activiti.org/javadocs/index.html) but could not figure out how to get the parser instance and then hook in via a listener. Is there any example ?

But anyhow, I am not sure If this is what I am looking for.

In general, I need to get informed on each step/node the engine is doing/passing on a specific process. This way I am able to follow exactly what is going on and update e.g. the bpmn-graph in a GUI or … .

wir33658
Champ in-the-making
Champ in-the-making
The link there does not work. I get for

http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/repository/source/jav...

"Not Found

The requested URL /repos/alfresco-open-mirror/alfresco/HEAD/root/projects/repository/source/java/org/alfresco/repo/workflow/activiti/AddTaskListenerParseListener.java was not found on this server.
Apache/2.2.0 (Fedora) Server at svn.alfresco.com Port 80"