cancel
Showing results for 
Search instead for 
Did you mean: 

Keep track of Sequence Flows in History

ayzegul
Champ in-the-making
Champ in-the-making
Hi,

I would like to keep track of sequence flows in history. The current implementation does not keep sequence flow history, I mean which activity instance comes before which one in the execution. A history table consisting of 3 columns will be sufficient: primary-key column, source-activity-ref column and target-activity-ref column.

So with the help of this information, for completed process instances, I can draw a graph that will show the execution history. In order to do this, I have tried attaching ExecutionListeners to both every activity in the process and every sequence flow. But, I couldn't find the necessary information to keep track of this kind of info. Is it possible with the current api? If it is not, maybe I can look into it and try to commit a patch for this.

Thanks,
Aysegul.
4 REPLIES 4

trademak
Star Contributor
Star Contributor
Hi,

Why did the execution listener not work?
When you have the history of tasks, can't you predict the sequence flow history?

Best regards,

ayzegul
Champ in-the-making
Champ in-the-making
Hi,

ExecutionListener doesn't work because the parameter object DelegateExecution does not contain any api methods to get the transition being taken, or the source and target activity definitions. I may try to cast it to what the engine sends as an implementation, but is this approach safe? What if the implementation class changes in the future? Is it safe to assume that the engine will send the same implementation for each activity type and flow?

Thanks,
Aysegul.

gualberto
Champ in-the-making
Champ in-the-making
Hi,

I had an similar issue, but partially solved with ExecutionListener.
See http://forums.activiti.org/comment/23761#comment-23761

Regards.

trademak
Star Contributor
Star Contributor
Hi,

In a sequence flow execution listener the input parameter can be ExecutionListenerExecution.
From there you can get the transition that will be taken.
I've an example about this in chapter 6 of the Activiti in Action book.

Best regards,