FUML 1.0b2 NO IDEA Avatar
  1. OMG Issue

FUML — [FUML] 8.6.3.2.4 CreateLinkActionActivation.doAction()

  • Key: FUML-26
  • Legacy Issue Number: 13544
  • 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.3.2.4 CreateLinkActionActivation

    Summary:

    CreateLinkActionActivation.doAction() creates a Link object and sets its features according to the link end data specified in the CreateLinkAction; however, the link type is not set to the association.

    Proposed resolution:

    Change the end of the CreateLinkActionActivation.doAction() method from:

    ExtensionalValueList extent = this.getExecutionLocus().getExtent(this.getAssociation());

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

    ExtensionalValue value = extent.getValue;

    Link link = (Link) value;

    boolean noMatch = true;

    int j = 1;

    while (noMatch & j <= endDataList.size()) {

    LinkEndCreationData endData = endDataList.getValue(j - 1);

    if (endData.isReplaceAll & this.endMatchesEndData(link, endData))

    { link.destroy(); noMatch = false; }

    j = j + 1;

    }

    }



    Link newLink = new Link();



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

    LinkEndCreationData endData = endDataList.getValue;



    int insertAt = 0;

    if (endData.insertAt != null) { insertAt = ((UnlimitedNaturalValue) (this.getTokens(endData.insertAt).getValue(0))).value.naturalValue; }

    newLink.setFeatureValue(endData.end, this.getTokens(endData.value), insertAt);

    }



    this.getExecutionLocus().add(newLink);



    To:



    Association linkAssociation = this.getAssociation();

    ExtensionalValueList extent = this.getExecutionLocus().getExtent(linkAssociation);



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

    ExtensionalValue value = extent.getValue;

    Link link = (Link) value;



    boolean noMatch = true;

    int j = 1;

    while (noMatch & j <= endDataList.size()) {

    LinkEndCreationData endData = endDataList.getValue(j - 1);

    if (endData.isReplaceAll & this.endMatchesEndData(link, endData)) { link.destroy(); noMatch = false; }

    j = j + 1;

    }

    }

    Link newLink = new Link();

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

    LinkEndCreationData endData = endDataList.getValue;

    int insertAt = 0;

    if (endData.insertAt != null)

    { insertAt = ((UnlimitedNaturalValue) (this.getTokens(endData.insertAt).getValue(0))).value.naturalValue; }

    newLink.setFeatureValue(endData.end, this.getTokens(endData.value), insertAt);

    }

    newLink.type = linkAssociation;

    this.getExecutionLocus().add(newLink);

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

    Change the code as (essentially) as proposed.

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