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
Updated: Mon, 6 May 2019 00:11 GMT
- image001.png 15 kB (image/png)