Create PeopleService using MagicDraw

This page provides directions to create the PeopleService using MagicDraw. The model is shown below for your reference.

  1. In the TimeTracker model create a package called service under org.andromda.timetracker. We will create our services in this package.
  2. In the Containment Tree on the left, right-click on the service package and select New Diagram > Class Diagram. Type in Services as the name of this diagram and click OK. The diagram is created and opened in a new window.
  3. Add a new class to the diagram and name it PeopleService.
  4. Add the stereotype called Service to PeopleService.
  5. Add three methods to PeopleService as shown above. Be careful with the return type of the last method. It is not interpretted as a PersonVO[] type when entered through the diagram. Double-click on the method and choose the correct return type in the operation specification dialog box.
  6. From the Containment Tree on the left, drag the Person class on to the diagram.
  7. Create a dependency from PeopleService to Person.
  8. Make sure your class diagram matches the one shown above.
  9. Save the model by selecting File > Save Project.

We are now ready to generate code for the PeopleService. Please go back to the main tutorial page and continue from where you left off.