In an earlier post, I identified ISO20022 as a model-driven success story. Here, I give some other examples of model-driven from e-Government and telecommunications. They are not all at the same level of maturity, but the reason why a model-driven approach makes sense is the same.
How to Manage Business Rules in a Table in MagicDraw
September 18th, 2012
Tables in MagicDraw are very useful and very easy to create. We use them to display lists of OCL rules in tables. Spend some time setting up customised tables for key information in your model, and you will be rewarded every time you open your project.
But it’s hard to remember how to create them. A helpful hint: they are called generic tables in MagicDraw and are a type of diagram!
Here are some step by step instructions on how to create one.
You will need:
MagicDraw version 17.0 or later (though they may be available in a slightly earlier version of Magicdraw).
Select Diagrams->Diagram Wizards->Generic Table Wizard…
Enter a table name e.g. “OCL Rules”, and select a location for the table in your project. Spend a bit of time thinking about where it should go, but you can always move it afterwards.
Select the type of thing (element) you want to list in the table. For example, you could select a constraint element or a class element. In our case, we select an OCLTransfomerValidationRule Stereotype (stereotypes are listed after elements in the dialog).
Select the elements to be displayed in the table. We select the package Payments, and click ‘Add Recursively’. All OCLTransformerValidationRules under this package will be displayed in the table.
Select the columns to be added. We choose Name (the name of the rule), Owner (the context of the rule), specification (the OCL), and Error message (the description).
Click finish and the table is created.
Here’s what our table of OCL looks like.
It’s easy to create generic tables. They are very useful. And you can also customise them once they are created. It’s worth putting in a little effort to configure them in your project.