Open wberges opened 1 year ago
Hello, Did someone investigate on this issue? If more info are needed, please ask (even if there are certainly enough details). Thanks
Hello, Did someone investigate on this issue? FYI we have encountered the same problem with an event message + a timer. It seems that, when both branches are activated at the same time (we receive a message when the timer is triggered, and vice versa), a FlowableOptimisticLock exception is raised, blocking the deletion of one of both events (e.g. the message event). At the end, 1 branch is able to continue, when the other one stays forever (dead), even if the workflow continues (and ends). Thanks
Hi @wberges, just a random observer here ...
Observations:
flowable:async="true"
at random places, which is quite unusual (and can have consequences):
<script>
steps: is it to not block on sleep(5000)
?<eventBasedGateway>
: shouldn't be needed, since by def this gateway suspends the execution, also it's not documented what this flag would do on it (didn't check the Flowable code, maybe it ignores the flag here)gtw_if_fork
x-gateway, seems strange to have a default unconditional branch as the first one, since the branches are supposed to be evaluated in XML-order, so the unconditional one should probably be the last one<eventBasedGateway>
, you can just fork right after the gtw_if_join
step via a <parallelGateway>
into 2 branches:
step3.0
(to compute endLoopDate
), the time-out timer (using that endLoopDate
), and the final step4.1
step3
(producing the result), the x-gateway (checking the result), the repeatedTimer
(if pending, loops back to step3
), and the final alternatives step4
and step4.2
.However, not sure that any of that would explain (or solve) the cross-process instance interference you suspect to observe.
Hello, I don't understand how you could replace an event based gateway (exclusive gateway where only the first event received will go in the right branch) by a parallel one (which will execute all the branches). Anyway, the goal was to create a valid and simple test BPMN to show the error I encountered in another context 😉 And the error occurs. Thanks for the investigation in all cases.
Hi,
the <parallelGateway>
of course requires an additional mechanism, to be able to "kill" the other branch — either by throwing a signal at it (received by a <boundaryEvent>
at the other branch), or by exiting via a terminating <endEvent>
(i.e. with nested <terminateEventDefinition />
), if both branches share the same (sub-)process.
Arguably, the <eventBasedGateway>
(if / when it works correctly) seems like a cleaner concept — though in a more complex setup, I'd anyway expect another parallel branch (or branches) to activate one of the <eventBasedGateway>
's outgoing flow. And I do understand that you simplified the flow to showcase the suspected error.
Is the issue still present it the latest Flowable release? I didn't yet get to reproducing locally what you observed, but will definitely try — simplifying the flows via <eventBasedGateway>
is appealing.
> or by exiting via a terminating endEvent In this case, you will encounter another issue still not solved (#3577) 😋
Describe the bug I have designed a loop with an event gateway waiting for either a timer for intermediate loops or another timer for the end (to avoid endless loops). Unfortunately, I have an unexpected behavior stopping the workflow in some cases (and nothing in Dead Letter). In some other cases where the end timer succeeds (sometimes after optimistic exception), its theoric end time is far exceeded.
I have tested with the Event Gateway synchronous, asynchronous, and asynchronous exclusive, still with error.
Expected behavior Each workflow started should reach the end event after the end timer duration.
Code Test_actinst_table.zip
Screenshots: Model of the loop (only the PENDING branch is used): 3 processes started: After full execution (no more log in console), we have several end results: [SUCCESS] Process successfully ended: [BUG] Process ended but with the intermediate loop timer in green...(??): [BUG] Process NOT ended BUT stuck (ACT_RU_ACTINST history not deleted, but no activity with NULL END_TIME...):
Additional context 6.7.2 with H2 (default config) in Tomcat 8
Console log:
ACT_RU_ACTINST: issue_eventgtw_actinst.docx