Home / Model Expert Homepage / Model Expert Help / Getting Started / Model Expert Walk-through #2- Guided Modeling
Import an MDG to create a Reference Model
Importing and exporting Reference Models
Editing RM Connector type properties
Stereotypes inheriting from other Element Types
Customizing Reference Model Properties
Customizing Reference Model Element Properties
Model Expert Walk-through #2- Guided Modeling
Guided Modeling
All of the functions in the first part of the Model Expert walkthrough – which are part of the free-for-life version of Model Expert – allow your modelers to get guidance on how they model. The functions above will let you find out what they have already done, and fix it, but that’s going to get boring if they keep doing it wrong, and you keep having to fix it.
Guided Modeling lets you specify how you want your models to look, and enforce those rules. And, at the same time, educate your modelers in how to do it right first time, next time.
Validating a Package
- First find the Reference Model (RM) that you’re going to use to validate this part of the model. That’s in ‘Example Reference Models / 1- Requirements and Stakeholders’. This RM just describes how requirements and stakeholders should be defined.
- Now find the packages we want to validate.
Find the package ‘Example requirements diagrams – un-managed’ in the example model.
This has some really simple content: just requirements, and the stakeholders who are connected to them. - There are a set of sub-packages under this just called Example #1…n.
Example #1 – checking a whole package
- Pick the first one ‘Example #1’ and right-click and choose ‘Specialize / Model Expert / Check package‘
- In the Reference Model drop-down, choose ‘Stakeholders and Requirements’.
- Everything should be ok: there isn’t very much content in this package, and MX will only check elements which are children of the package.
This what we want all our packages to look like!
Example #2
Now try the same thing on the ‘Example #2’ package.
- If you open the Example #2 diagram, it all LOOKS ok. But diagrams don’t tell the whole story.
- Right click the ‘Example #2’ package, and against choose to check it against the ‘Stakeholders and Requirements’ RM.
- The modeler here has done all kinds of things which go against the rules in the RM – the check creates a list of violations.
- Notice that the Violation List has a Severity for each violation, to give an idea of how serious each one is. See Built-in validation rules for how to configure these.
Note: This is an example package, and we’ve added lots of errors into it to show what Model Expert can do.
But EA is all about diagrams, so maybe it’s more friendly to show user what they are doing wrong in a diagram (see below).
Validating a Diagram
Instead of validating a whole package, try validating a diagram.
- In the Example #2 package, find the diagram, and right-click and Check Diagram.
- Again choose the Stakeholders and Requirements Reference Model, and there is also an option to choose which kind of diagram this is. See Validate a Diagram against a Reference Model
- You should now see an annotated copy of the diagram, showing the modeling exactly where the problems are.
Note that this really is a COPY of the diagram: it would not be polite to draw all over the modelers diagram. - This takes all the information in the Violation list (see above) and makes it much easier to see where the problems are.
- There are also helpful notes, attached the the elements or connectors where there are errors, and those elements or connectors are colored.
- There is also a helpful legend, to explain those colors.
- On one of these notes, there is even a hyperlink, which lets you point the modeler to even more help, for example on your intranet. So you can deliver help right to where the modeler needs it. (In this example, the hyperlink takes you to the eaDocX.com website.)
Fixing the errors
With all these helpful notes and hyperlinks, fixing the errors is simple:
- Actor3 is missing a tagged value called ‘Role’, so add one
- Requirement4 has the wrong stereotype, so change it
- The connector which links these two is also of the wrong type: just delete it, and put in a ‘Dependency’ like all the others.
That’s it.
Not only have we showed the modeler where the errors are, but if we had content behind the hyperlink, we also reminded them of why they need to model requirements and stakeholder like this. So next time, they can get it right first time.
Severities and numbers
When Model Expert checks a diagram or a package, it will give each error a severity. These get added-up across all the content which you are checking, to produce an overall number: the Total Violation Score, which appears in the annotated diagram.
This provides a single quality measure of the package or the diagram. This can be useful when setting standards for your modeling. You might, for example, say that a diagram must have a total score of, say, less that 5 before it is allowed to be peer-reviewed. Or that it must score zero to be included in a document.
In this way, Model Expert can contribute to maintaining you model quality and support your modeling processes.
“Smart Modelling” – the really smart bit of Model Expert.
So far, we have seen how Model Expert can help a modeler to fix errors once they have happened.
But why not stop the errors before they happen? Why not use the rules which are in a Reference Model to guide the modeler as they are drawing diagrams.
Making a package ‘managed’
In the example model, find the package called ‘Model Expert Examples / Smart Modeling‘, and the Example #2 package, which has yet another of these stakeholder/requirements diagrams.
We want to say that this package, and all it’s contents’ should use the ‘Stakeholders and Requirements’ model – always. That way, modelers will et real-time validation of everything in the package.
- Right-click on the ‘Example #3‘ package in the project browser, and choose Specialize /Model Expert / Manage Package
- Choose the ‘Stakeholders and Requirements’ RM from the drop down. Ignore the other options for the moment.
The ‘Example #3’ package is now ‘managed’ by this RM.
Now you can see what effect this has on a modelers experience of EA.
Real time help
In Example #3, find the diagram. In this one, there is a missing connection between Actor Z and Requirement 4.
- Lets try and create a connector.
- Use the Quick Linker to connect Actor Z with Requirement 4, and make the connector type ‘Realization’.
- To use the EA Quick Linker, click the ‘Actor Z’ element, and drag the ‘up arrow’ top righ over to Requirement 4
- Choose Realization from the popup
- (You could also connect the element using a connector from the toolbox, or any other way)
- As you try to make the connector, the Model Expert Reference Model steps in and checks that ‘Realization’ is allowed by this RM: it is not.
- So you see a popup, telling you there’s a problem and offering you the correct way.
- Choose the ‘Dependency’ option (there is onty one kind of connection which is valis between these two types of element)
- Model Expert then draws the right kind of connector.
Editing element properties
The Reference Model which is managing this package also knows what fields and tagged values each type of element needs.
- So try to double-click on a ‘Requirement’ in this diagram.
- Model Expert produces a simplified ‘Properties’ form, which only has those fields and tagged values which the RM defines – nothing else.
- This makes filling-in these properties simpler and creates fewer errors.