🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
Build your first MDriven application
This page was created by Wikiadmin on 2026-07-29. Last edited by Wikiadmin on 2026-07-29.

This tutorial introduces a small MDriven Designer workflow: create a model, add a class and attribute, run it with XML persistence, create data, save it, and query it with OCL.

Before you begin

Follow the installation instructions linked from Bootcamp Chapter 1, then start MDriven Designer.

Build a Person model

  1. Create a new empty model.
  2. Save the model on your device. For example, save it as c:\temp\MDrivenEducation\Start.modlr, or use an equivalent location.
  3. Create a class named Person.
  4. Add an attribute named Name with type String to the Person class.
  5. Save the model. Continue saving with CTRL + S as you work.

Your model has one class and one attribute:

Class Attribute Type
Person Name String

Run the model and create data

  1. Press the Play button on the left of the top menu.
  2. Choose XML persistence.
  3. Select Start system, then select Show debugger.
  4. In a Debugger Expression box, enter and run this OCL expression:
person.allinstances
  1. Confirm that the result list is empty. You have defined the Person class, but have not yet created any Person objects.
  2. In the Debugger, open a Seeker. Its search is empty.
  3. Select Create New twice to create two Person objects.
  4. Select the first row, right-click it, and select Open. In the AutoForm, enter your name in the Name field.
  5. Open the second row and enter another name, such as SomeOtherDude.
  6. Use the save button in the Debugger to save the Person objects.

Verify the saved result

  1. Find the saved XML file on disk in the same location as the model file.
  2. Open the XML file in Notepad or another application, find the names you entered, and close the file.
  3. Return to the Debugger Expression box and run the expression again:
person.allinstances
  1. Confirm that the result contains two rows.

You have created a class and attribute in a model, run the model, created and saved objects, and queried the objects with OCL.

Next exercise: model a task planner

For an example that adds classes, associations, attributes, and derived values, see How to Build a Team Task Planner in 15 Minutes with MDriven. Its example uses Team, Project, Task, and Member classes, and introduces derived attributes defined with OCL.

See also