Source: Model Driven Solutions ( Ed Seidewitz)
Consider the following activity:
Per the fUML execution model, when the ActivityFinalNodeActivation is fired, the ActivityExecution will terminate, and all nodes inside the activity group will be terminated (ActivityNodeActivationGroup::terminateAll()).
When ForkNodeActivation is terminated, it will clear all its tokens. And, when the token is cleared, it will be removed from its holder (Token::withdraw()). In the case the holder of the token is a DataStoreNodeActivation, it then will remove that token (DataStoreNodeActivation::removeToken(Token))
According to the specification of DataStoreNodeActivation:
If this.isRunning() returns true, it will continue to send unoffered tokens, leading to the execution never ending.
Whether this.isRunning() returns true or false depends on the order of termination of DataStoreNodeActivation and ForkNodeActivation in the activity group. If DataStoreNodeActivation::terminate() is called before ForkNodeActivation::terminate(), it is fine (DataStoreNodeActivation::isRunning() will be false). If DataStoreNodeActivation::terminate() is called after ForkNodeActivation::terminate(), DataStoreNodeActivation::isRunning() is still true, and the execution does not end.
Reported: FUML 1.4b1 — Thu, 22 Nov 2018 19:00 GMT
Disposition: Resolved — FUML 1.5
The problem is that ForkNodeActivation::terminate clears its tokens before it terminates the activation. If it terminated first (i.e., called super.terminate() before calling self.clearTokens()), then, when it received another offer from the data store node, it would ignore it. ObjectNodeActivation::terminate used to have this same problem, but it was changed in fUML 1.3 as part of the update adding central buffer and data store nodes. Unfortunately, a similar change to ForkNodeActivation::terminate was not made at that time.
Updated: Fri, 18 Sep 2020 17:03 GMT
- image001.png 15 kB (image/png)