cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong script task listener executed

rwa
Champ in-the-making
Champ in-the-making
Hi,

We face a really annoying bug with activiti.

We use version 5.13 of activiti.

Here is the bug scenario (see bpmn here: https://drive.google.com/file/d/0BxxZafFzNUQdV1JGSnRUZ242SnM/view?usp=sharing for activity references) :
The process instance is in the usertask31 activity. The user does action for going out of this task and going into servicetask1.
This causes an error that says : "No outgoing sequence flow of the exclusive gateway 'exclusivegateway35' could be selected for continuing the process".
The bug appears randomly. When the bug occurs, a restart of alfresco resolves the problem.

After some analysis and adding some logs in activiti engine code, we found that in fact a wrong listener seems to be executed : The complete-event listener attached to task usertask23 is executed instead of the complete-event listener of task usertask31.

Our listeners are implemented by alfresco script task listener (org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener).

We check forums and activiti release notes about such a bug but with no result.

Do you have any idea about this bug ?
Do you think that a wrong task-listener association could be done (randomly!) ?
15 REPLIES 15

jbarrez
Star Contributor
Star Contributor
The error "This causes an error that says : "No outgoing sequence flow of the exclusive gateway 'exclusivegateway35' could be selected for continuing the process"." means that none of the expressions defined on the sequenceflow going out of 'exclusivegateway35' evaluated to true.

The fact you say this is happening 'randomly' means that at that point your data is different and evaluates to false. In the other cases, it evaluates to true for one of the expressions.

rwa
Champ in-the-making
Champ in-the-making
I agree with your reasoning, but as I said in the second part of my post, we added some logs into activiti engine core to understand what happened exactly. It appears that the complete listener of the task usertask31 (the one we complete) is not executed. Instead, the complete listener of the task usertask23 is executed (although the process does not go through usertask23).

So, do you think that a wrong task-listener association could be done (randomly!) ?
Have you ever heard of such a bug?

vasile_dirla
Star Contributor
Star Contributor
Hi,
I never seen or even heard about this behaviour but would be nice if you could provide a unit test to reproduce this behaviour. (it would be a good starting point of investigation)

Considering that Activiti 5.13 is more than 2 years old, did you test it with a more recent version of Activiti ?


rwa
Champ in-the-making
Champ in-the-making
No we did not test it with a more recent version of Activiti. I cannot upgrade right now.

I make unit test in order to reproduce the problem. But I face some problem to run unit test on my workflow. As I said, I use some alfresco component (e.g. alfresco ScriptTaskListener). This causes exception when running test.
How could I configure activiti unit test to be able to run it on a workflow containing alfresco component ?

jbarrez
Star Contributor
Star Contributor
Doesn't need to be that particular script task listener … any task listener would do. Given your explanation above, the error doesn't seem to be in the area of the tasklistener, right?

rwa
Champ in-the-making
Champ in-the-making
It could be in the area of the listener because the right task is executed/completed (usertask31) but the wrong listener is executed (the one of task usertask23). I check the bpmn code in db : No error. So it seems like the listeners loading in cache is wrong.

jbarrez
Star Contributor
Star Contributor
That would be very strange, I would assume many more people would have seen the issue if some caching would be wrong.

scspy
Champ in-the-making
Champ in-the-making
Hi,

We faced same problem on production server. Configuration: alfresco version 4.2.4, activiti version 5.13-alf-20140708.
We have 600 everyday active users. Sometimes complete task listeners aren't execute and process's behavior goes incorrect.
After restart system behaves normally, but then problem appears again in other process instances.
We can't reproduce this problem on unit tests.

ilyagalahov
Champ in-the-making
Champ in-the-making
Hello.

The same issue…
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.