Possible issue with user-defined keyword

I have declared the following types/definitions and two user-defined kewords:

occurrence def InstantaneousEvent {
  occurrence redefines endShot = startShot;
  derived attribute occurrenceTime: Time::TimeInstantValue = Time::TimeOf( self);
}
action def InstantaneousAction :> InstantaneousEvent;

// user-defined keword #instevt 
metadata def  InstantaneousEventType :> SemanticMetadata {
  :>> baseType = InstantaneousEvent meta SysML::Definition;
}
// user-defined keword #instact
metadata def  InstantaneousActionType :> SemanticMetadata {
  :>> baseType = InstantaneousAction meta SysML::Definition;
}

Then #instact is used in the action type definition MoveUp:

enum def CabinStatusEL { IDLE1; MOVINGUP; IDLE2; MOVINGDOWN; }
part def ElevatorCabin {
  attribute cabinStatus: CabinStatusEL;
  …
}
#instact def MoveUp {
  in elevCab: ElevatorCabin;
  assign elevCab.cabinStatus := CabinStatusEL::MOVINGUP;
}

But it seems to be not recognized as an action type definition since the use of ‘assign’ is not admitted with the error message “Unexpected ‘assign’, …”.

This is an issue with the specification and SysML grammar where structural types are not inherited (since they are types rather than node kinds/enums), and body syntax differs between different structural types.

#instact def MoveUp {
  ...
}

declares a regular Definition which does not allow action nodes in the body. The fix is to add `action explicitly

#instact action def MoveUp {
  ...
}