FUML 1.0b2 NO IDEA Avatar
  1. OMG Issue

FUML — 8.6.4.2.1 [5]AcceptEventActionActivation::accept(in signalInstance:SignalInstance)

  • Key: FUML-27
  • Legacy Issue Number: 13546
  • Status: closed  
  • Source: NASA ( Dr. Nicolas F. Rouquette)
  • Summary:

    Specification: Semantics of a Foundation Subset for Executable UML Models, FTF – Beta 1 (ptc/08-11-03)
    Section: 8.6.4.2.1 AcceptEventActionActivation

    Summary:

    The AcceptEventActionActivation::accept() unconditionally places values on output pins even if the action does not have any output pin.

    Proposed resolution:

    Change the operation from:

    // Accept a signal occurance for the given signal instance.

    // If the action does not unmarshall, then place the signal instance on

    // the result pin.

    // If the action does unmarshall, then get the feature values of the

    // signal instance, and place the values for each feature on the

    // corresponding output pin.

    // Concurrently fire all output pins while offering a single control

    // token.

    // If there are no incoming edges, then re-register this accept event

    // action execution with the context object.

    AcceptEventAction action = (AcceptEventAction) (this.node);

    OutputPinList resultPins = action.result;

    Debug.println("[accept] action = " + action.name + ", signalinstance = " + signalInstance);

    if (this.running) {

    if (!action.isUnmarshall)

    { ValueList result = new ValueList(); result.addValue(signalInstance); this.putTokens(resultPins.getValue(0), result); }

    else {

    FeatureValueList featureValues = signalInstance.getFeatureValues();

    for (int i = 0; i < featureValues.size(); i++)

    { FeatureValue featureValue = featureValues.getValue(i); OutputPin resultPin = resultPins.getValue(i); this.putTokens(resultPin, featureValue.values); }

    }

    this.sendOffers();

    this.waiting = false;

    Debug.println("[fire] Checking if " + this.node.name + " should fire again...");

    // if (this.isReady())

    { // this.fire(); // }

    this.receiveOffer();

    }



    }



    To:



    // Accept a signal occurance for the given signal instance.

    // If the action does not unmarshall, then place the signal instance on

    // the result pin, if any.

    // If the action does unmarshall, then get the feature values of the

    // signal instance, and place the values for each feature on the

    // corresponding output pin, if any.

    // Concurrently fire all output pins, if any, while offering a single control

    // token.

    // If there are no incoming edges, then re-register this accept event

    // action execution with the context object.



    AcceptEventAction action = (AcceptEventAction) (this.node);

    OutputPinList resultPins = action.result;



    Debug.println("[accept] action = " + action.name + ", signalinstance = " + signalInstance);



    if (this.running) {

    if (resultPins.size() > 0) {

    if (!action.isUnmarshall) { ValueList result = new ValueList(); result.addValue(signalInstance); this.putTokens(resultPins.getValue(0), result); } else {

    FeatureValueList featureValues = signalInstance.getFeatureValues();

    for (int i = 0; i < featureValues.size(); i++) { FeatureValue featureValue = featureValues.getValue(i); OutputPin resultPin = resultPins.getValue(i); this.putTokens(resultPin, featureValue.values); }

    }

    }

    this.sendOffers();



    this.waiting = false;



    Debug.println("[fire] Checking if " + this.node.name + " should fire again...");

    // if (this.isReady()) { // this.fire(); // }

    this.receiveOffer();

    }

    }

  • Reported: FUML 1.0b1 — Wed, 25 Feb 2009 05:00 GMT
  • Disposition: Resolved — FUML 1.0b2
  • Disposition Summary:

    If isUnmarshall is true, then the action is required to have output pins corresponding to any signal attributes, and the specification is already correct in this case. It is only in the case that isUnmarshall is false that the specification is incorrect in assuming that there must be an output pin.

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