Signalling parallel execution in service task

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2014 12:47 PM
Hi,
we are currently trying to model two parallel executions where one execution signals the other to terminate. We have tried to use signals to trigger the termination:
[IMG]http://i.imgur.com/WU3SV5o.png[/IMG]
As signals are broadcasted to all executions in all running process instances, we use a service task to only signal executions in the current process instance. However, in our test case, we receive the following exception:
In our real live application, the service task terminates the parallel execution just fine, but the service task itself remains active.
We think that there is an issue with the service task trying to influence the control flow by sending signals.
Two questions:
Attached you will find the test case and stack trace.
Thank you very much for your help
Michael
we are currently trying to model two parallel executions where one execution signals the other to terminate. We have tried to use signals to trigger the termination:
[IMG]http://i.imgur.com/WU3SV5o.png[/IMG]
As signals are broadcasted to all executions in all running process instances, we use a service task to only signal executions in the current process instance. However, in our test case, we receive the following exception:
org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: org.h2.jdbc.JdbcSQLException: Referentielle Integrität verletzt: "ACT_FK_TASK_EXE: PUBLIC.ACT_RU_TASK FOREIGN KEY(EXECUTION_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_) ('9')" Referential integrity constraint violation: "ACT_FK_TASK_EXE: PUBLIC.ACT_RU_TASK FOREIGN KEY(EXECUTION_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_) ('9')"; SQL statement: delete from ACT_RU_EXECUTION where ID_ = ? and REV_ = ? [23503-168] ### The error may involve org.activiti.engine.impl.persistence.entity.ExecutionEntity.deleteExecution-Inline ### The error occurred while setting parameters ### SQL: delete from ACT_RU_EXECUTION where ID_ = ? and REV_ = ?
In our real live application, the service task terminates the parallel execution just fine, but the service task itself remains active.
We think that there is an issue with the service task trying to influence the control flow by sending signals.
Two questions:
- Do you think, this is a bug?
- How would you otherwise model this use case?
Attached you will find the test case and stack trace.
Thank you very much for your help
Michael
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2014 06:20 AM
> As signals are broadcasted to all executions in all running process instances,
A signal has also an optional 'activiti:scope' property, which you can set to 'process instance' to not be broadcasted that wide. Did you try that?
Signal catching on service tasks is dodgy im afraid, as you can't kill java logic executing that easy.
A signal has also an optional 'activiti:scope' property, which you can set to 'process instance' to not be broadcasted that wide. Did you try that?
Signal catching on service tasks is dodgy im afraid, as you can't kill java logic executing that easy.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2014 10:15 AM
Hi jbarrez,
The property 'activiti:scope' sounds just like the feature we need!
However, I constructed a small test example very similar to my picture above with a signal throwing event instead of a service task. Executing the example still throws an exception:
It seems that activiti tries to delete the execution of the upper parallel branch, however, the user task is not deleted first.
We use activiti v5.14. Are there known issues with the signal boundary event being used on a user task?
I can provide the unit test, if you like. How do I upload a file other than simple text file?
The property 'activiti:scope' sounds just like the feature we need!
However, I constructed a small test example very similar to my picture above with a signal throwing event instead of a service task. Executing the example still throws an exception:
…
Referential integrity constraint violation: "ACT_FK_TASK_EXE: PUBLIC.ACT_RU_TASK FOREIGN KEY(EXECUTION_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_) ('9')"; SQL statement:
delete from ACT_RU_EXECUTION where ID_ = ? and REV_ = ? [23503-168]
…
It seems that activiti tries to delete the execution of the upper parallel branch, however, the user task is not deleted first.
We use activiti v5.14. Are there known issues with the signal boundary event being used on a user task?
I can provide the unit test, if you like. How do I upload a file other than simple text file?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2014 07:43 AM
It's not a known issue for sure.
A unit test would be appreciated. You can always rename the file to have a .txt extension here 😉
A unit test would be appreciated. You can always rename the file to have a .txt extension here 😉

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2014 09:05 AM
Attached the unit test built on top of the activiti-unit-test-template.
Thanks for your help!
Michael
Thanks for your help!
Michael
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2014 03:41 PM
Verified, indeed a bug.
Bugfix has been pushed: https://github.com/Activiti/Activiti/commit/0eeca1883e64b6218228d61b39bb45803ab75f54
It will be part of Activiti 5.15.1, which will be released later this week.
Bugfix has been pushed: https://github.com/Activiti/Activiti/commit/0eeca1883e64b6218228d61b39bb45803ab75f54
It will be part of Activiti 5.15.1, which will be released later this week.
