FUML 1.5 RTF Avatar
  1. OMG Issue

FUML15 — Execution of an activity with a data store may never end

  • Key: FUML15-9
  • Status: closed  
  • Source: Model Driven Solutions ( Mr. Ed Seidewitz)
  • Summary:

    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:

    [1] removeToken ( in token : Token ) : Integer
    // Remove the given token from the data store, but then immediately
    // add a copy back into the data store and offer it (unless the
    // node activation has already been terminated).
    int i = super.removeToken(token);
    if (this.isRunning()) {
    return i;

    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
  • Disposition Summary:

    Fix ForkNodeActivation::terminate

    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
  • Attachments: