Skip to content

[metamodel] PerformActionUsage.performedAction returns the perform itself when the action is referenced through a feature chain #2541

Description

@atanaka

Summary

For perform a.b;, the derived performedAction of the PerformActionUsage is the PerformActionUsage itself instead of
b. perform b; works. The same pattern is in EventOccurrenceUsageImpl.basicGetEventOccurrence().

The SysML v2 Pilot Implementation (0.62.0) returns b in both cases.

Environment

  • SysON v2026.9.0 and v2026.9.2 (Docker images eclipsesyson/syson:v2026.9.0 / v2026.9.2, linux/amd64), blank project
  • Model uploaded through the GraphQL uploadDocument mutation, read back through the SysML v2 REST API

Reproduction

Upload into a blank project:

package PerformRepro {
    action root {
        action capture;
    }
    action simple;
    part unit {
        perform root.capture;
        perform simple;
    }
}

Read the two PerformActionUsage elements with GET /api/rest/projects/{p}/commits/{p}/elements:

Declaration performedAction (SysON) ReferenceSubsetting.referencedFeature Pilot getPerformedAction()
perform root.capture; the PerformActionUsage itself a Feature chaining root, capture PerformRepro::root::capture
perform simple; PerformRepro::simple PerformRepro::simple PerformRepro::simple

Pilot values were printed by calling SysMLInteractive.process() on the same text and
PerformActionUsage.getPerformedAction() on each result.

Cause

PerformActionUsageImpl.basicGetPerformedAction() (decompiled from syson-sysml-metamodel-2026.9.0.jar) returns the
referenced feature only when it is an ActionUsage, and this otherwise. Its bytecode is equivalent to:

ReferenceSubsetting ref = getOwnedReferenceSubsetting();
if (ref != null && ref.getReferencedFeature() instanceof ActionUsage action) {
    return action;
}
return this;

For perform root.capture; the referenced feature is the owned chaining Feature, which is not an ActionUsage, so
this is returned. EventOccurrenceUsageImpl.basicGetEventOccurrence() has the same shape with OccurrenceUsage.

Suggested fix

Test the feature the chain designates rather than the chaining feature itself, e.g. referencedFeature.getFeatureTarget()
(the last chaining feature, or the feature itself when it has none), in both methods.

Impact

Any consumer that asks which action a part performs gets the wrong answer whenever the action is referenced through a
feature chain, for example when functions are nested in a functional breakdown. The Arcadia library example
optical-mouse.sysml
allocates functions this way (perform 'Root Function'.'Capture Movement';).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions