Action must have a name
No edit summary |
(Automatically adding template at the end of the page.) |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
If you get this model error message, an action has been orphaned in your model. | If you get this model error message, an action has been orphaned in your model. For example, a Class has been deleted, but, for some reason, the Class action belonging to it was left behind. | ||
To remove actions without a name, open the OCL debugger for the model itself by right-clicking on a diagram background and selecting Extras -> Open model debugger... | |||
# Make one (probably the only one) of the expressions there an Action (1) | |||
Make one (probably the only one) of the expressions there an Action (1) | # Paste the code below (2) | ||
# Execute it using F5 or the button (3) | |||
Paste the code below (2) | |||
Execute it using F5 or the button (3) | |||
AbstractAction.allInstances->select(aa|aa.Name.isNullOrEmpty).delete | AbstractAction.allInstances->select(aa|aa.Name.isNullOrEmpty).delete | ||
Close the dialog and save | Close the dialog and save your model as usual. | ||
[[File:Removing unnamed actions.png|none|thumb|543x543px]] | [[File:Removing unnamed actions.png|none|thumb|543x543px]] | ||
[[Category:Actions]] | |||
{{Edited|July|12|2024}} |
Latest revision as of 15:26, 10 February 2024
If you get this model error message, an action has been orphaned in your model. For example, a Class has been deleted, but, for some reason, the Class action belonging to it was left behind.
To remove actions without a name, open the OCL debugger for the model itself by right-clicking on a diagram background and selecting Extras -> Open model debugger...
- Make one (probably the only one) of the expressions there an Action (1)
- Paste the code below (2)
- Execute it using F5 or the button (3)
AbstractAction.allInstances->select(aa|aa.Name.isNullOrEmpty).delete
Close the dialog and save your model as usual.
This page was edited more than 11 months ago on 02/10/2024. What links here