SysON version: v2026.9.0 (eclipsesyson/syson:v2026.9.0 image)
Component: syson-sysml-metamodel-services / SysMLElementSerializer (caseSuccessionAsUsage, caseDecisionNode)
Summary
Exporting a project created from the bundled Batmobile template to SysML v2 text splits
into two lines, the first of which has no target:
action def 'Drive Batmobile' {
first start then startBatmobile;
action startBatmobile;
then scanEnvironment;
action scanEnvironment {
out status : StatusKind;
}
then;
decide ;
if scanEnvironment.status == StatusKind::safe then 'Switch to standard mode';
if scanEnvironment.status == StatusKind::alert then 'Switch to alert mode';
action 'Switch to standard mode';
...
then; is not valid SysML v2 text — a succession needs a target — so a conformant parser rejects the file (e.g. "expected a name" at the then; line). Everything before this point in the action body exports correctly.
The reference text next to the template (templates/Batmobile.sysml) has:
then decide;
if scanEnvironment.status == StatusKind::safe then 'Switch to standard mode';
if scanEnvironment.status == StatusKind::alert then 'Switch to alert mode';
Steps to reproduce
- Start SysON v2026.9.0 and create a new project from the Batmobile template.
- Export the project to SysML v2 text (download the
.sysml document, or call SysMLv2DocumentExporter on the document).
- Look at
action def 'Drive Batmobile', just after action scanEnvironment.
What the model looks like
In templates/Batmobile.json the decision node is a sysml:DecisionNode with no declaredName, owned by 'Drive Batmobile' through a FeatureMembership. The succession that leads to it is a SuccessionAsUsage whose target EndFeatureMembership owns a ReferenceUsage with no ReferenceSubsetting — the target is only bound implicitly (the "next member" semantics of then <node>), so there is no named feature for the serializer to print after then.
Expected
i.e. when a succession's target is an unnamed control node that immediately follows it (the TargetSuccession + inline ActionNode grammar form), serialize the node inline after then and skip its standalone declaration.
Actual
Related
Notes
caseSuccessionAsUsage unconditionally appends then and then appendConnectorEndMember(second), which produces nothing when the end has no ReferenceSubsetting/name. Emitting then with no target should either inline the following anonymous node or be reported as an export error rather than written out.
decide ; (with the stray space from "decide " + an empty usage declaration) is legal on its own, but once the succession is inlined it should disappear as a separate statement.
- The same code path is likely to affect
then fork;, then join;, then merge; and then done; where the node is anonymous.
Related (smaller) issue in the same export, if you prefer to track it separately
caseSatisfyRequirementUsage appends by unconditionally, so a satisfy usage without a SubjectMembership exports as
part def 'Part list' {
assert satisfy 'system components' by;
}
which is invalid text; the template source is satisfy 'system components';. The by keyword should only be written when a satisfaction subject exists.
SysON version: v2026.9.0 (
eclipsesyson/syson:v2026.9.0image)Component:
syson-sysml-metamodel-services/SysMLElementSerializer(caseSuccessionAsUsage,caseDecisionNode)Summary
Exporting a project created from the bundled Batmobile template to SysML v2 text splits
into two lines, the first of which has no target:
then;is not valid SysML v2 text — a succession needs a target — so a conformant parser rejects the file (e.g. "expected a name" at thethen;line). Everything before this point in the action body exports correctly.The reference text next to the template (
templates/Batmobile.sysml) has:Steps to reproduce
.sysmldocument, or callSysMLv2DocumentExporteron the document).action def 'Drive Batmobile', just afteraction scanEnvironment.What the model looks like
In
templates/Batmobile.jsonthe decision node is asysml:DecisionNodewith nodeclaredName, owned by'Drive Batmobile'through aFeatureMembership. The succession that leads to it is aSuccessionAsUsagewhose targetEndFeatureMembershipowns aReferenceUsagewith noReferenceSubsetting— the target is only bound implicitly (the "next member" semantics ofthen <node>), so there is no named feature for the serializer to print afterthen.Expected
i.e. when a succession's target is an unnamed control node that immediately follows it (the
TargetSuccession+ inlineActionNodegrammar form), serialize the node inline afterthenand skip its standalone declaration.Actual
Related
first X then;output for a state-machine model (v2026.7.0); same symptom (a succession written without its target), possibly the same root cause.then decide;as their example, so this is a regression or an uncovered case of that work.Notes
caseSuccessionAsUsageunconditionally appendsthenand thenappendConnectorEndMember(second), which produces nothing when the end has noReferenceSubsetting/name. Emittingthenwith no target should either inline the following anonymous node or be reported as an export error rather than written out.decide ;(with the stray space from"decide "+ an empty usage declaration) is legal on its own, but once the succession is inlined it should disappear as a separate statement.then fork;,then join;,then merge;andthen done;where the node is anonymous.Related (smaller) issue in the same export, if you prefer to track it separately
caseSatisfyRequirementUsageappendsbyunconditionally, so a satisfy usage without aSubjectMembershipexports aswhich is invalid text; the template source is
satisfy 'system components';. Thebykeyword should only be written when a satisfaction subject exists.