When declaring Actions in MDriven, you have the option of giving a name (required) and a Presentation (defaults to <Name>).
The reason for the two different properties is that the ActionName must be globally unique for all actions. It is used for the presentation of the action and as a reference name of the action. The presentation is, however, the text we use when presenting the action in a contextmenu or in the MDriven Prototype left-side action column.
Since the Presentation often resembles the Name, we have introduced the following shorthand/activecontent:
| ActionName | Presentation value | Presentation result |
| Somename | <Name> | Somename |
| SomeName | <Name> | Some Name |
| SomeName | Extra1 <Name>
Extra2 |
Extra1 Some Name Extra 2 |
| SomeName | <AsString> | âDefaultStringRep of context objectâ |
| SomeName | <Name>
<AsString> |
Some Name âDefaultStringRep of context objectâ |
| SomeName | <AsString:Attribute1> | âValue of attribute1 of context objectâ |
| SomeName | Extra1 <Name>
Extra2 <AsString:Attribute1> Extra3 |
Extra1 Some Name Extra 2 âValue of attribute1 of context objectâ Extra 3 |
The context object is of course the object that the actions are acting on. So it is intended to be used with âClass actionsâ.
Constraints descriptions[edit | edit source]
As we introduced the above-mentioned shorthand, we also made the <AsString:attributeX> part available in the constraints Description texts. This way your constraints descriptions can get context info. If you have the need for a complex expression, like navigation for pulling attributes from neighbor classes, you are advised to create the expression as a derived attribute that you then can reference from your constraint description text.
The MDriven Book - Next Chapter: Microsoft office and OpenDocument as a Report generator
