UML 2.2 RTF Avatar
  1. OMG Issue

UML22 — A final node that returns to the caller but leaves alive any parallel flow

  • Key: UML22-384
  • Legacy Issue Number: 12284
  • Status: closed  
  • Source: France Telecom R&D ( Mariano Belaunde)
  • Summary:

    The regular ActivityFinalNode stops all possible parallel flows in the activity before
    returning to the caller.
    There are some cases where it would be interesting to have a variant of this behavior
    which would allow returning immediately but without affecting the execution of any
    parallel flow.

    A use case for this "soft return" construct: An application process a user "search" request.
    When it founds a first set of results it returns immediately the response to the user but it
    the meantime continues looking for another set of requests to anticipate possible additional
    request from the user, without loosing the context of the user request.

    For this use case we will use the "soft return" final node to return when finding the first
    set of responses and will use a FlowFinalNode at the end of a parallel branch looking for
    additional responses.
    For sure, it is always possible to encode this use case differently, but such new kind of
    final node would allow to model the intended behavior more directly.

    Rq: What would happen if a "soft return" is reached after a "soft return" already happened:
    I guess the semantics would be to behave as a FlowFinalNode (cannot return twice).
    And what if a "regular" ActivityFinalNode is reached after a "soft return": I guess all
    existing parallel are stopped but there is no return to the caller (since already returned).

  • Reported: UML 2.1.2 — Tue, 18 Mar 2008 04:00 GMT
  • Disposition: Resolved — UML 2.2
  • Disposition Summary:

    A behavior that is initially invoked via a synchronous call does not have its own thread of control, so it would be a fundamental semantics change to somehow allow it to continue executing after returning from the call. Fortunately, however, the functionality desired by the submitter can be easily achieved using existing UML mechanisms, by first starting the activity asynchronously, either as a classifier behavior or as a standalone behavior execution. Such an executing activity can then accept client requests using an accept event action and respond to them without terminating, as the submitter envisions. The activity can even accept a synchronous call via an accept call action and reply using a reply action, without terminating. In this case, the reply action acts, in effect, as the "soft return" suggested by the submitter.
    Revised Text:
    Disposition: Closed No Change

  • Updated: Fri, 6 Mar 2015 20:58 GMT