I have the situation that I have a database call which gives me a list of elements. Some activities later I write down the modified elements to the db. This is working fine als long as I don't have parallelism. The problem is that the second db operation potentially affects the first db operation. If now two tasks arrive at the first element and read from the database before one task has written the result to the db I get a wrong result. The solution would be to prevent the second task entering the first database read until the first task has written down the result. Do we have some kind of support for such cases? asked 14.11.2016 at 20:58 ruffzy |
You could encapsulate the relevant DB steps in a SubProcess. Instead of calling the SubProcess directly you could delegate that to a Java method with 'synchronized' modifier. To call a SubProcess from Java just use the SubProcessCall API: http://developer.axonivy.com/doc/latest/publicApi/ch/ivyteam/ivy/process/call/SubProcessCall.html Or if you not on the leading edge train: use the elder SubProcessRunner API: http://developer.axonivy.com/doc/latest/publicApi/ch/ivyteam/ivy/process/call/SubProcessRunner.html answered 16.11.2016 at 13:03 Reguel Werme... ♦♦ Thank you very much for your approach - as long as there is no task switch in the called SubProcess it's working fine.
(07.12.2016 at 13:56)
ruffzy
|
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 14.11.2016 at 20:58
Seen: 2,004 times
Last updated: 07.12.2016 at 13:56