UML Object Diagram with Enterprise Architect

What is a UML Object Diagram?

A UML Object Diagram gives you a snapshot of your system’s behavior, capturing your software in motion, but at one precise moment. Unlike Class Diagrams, which show the structure of the system, Object Diagrams focus on what is actually happening during execution. You’ll see concrete instances of classes (called objects), their values, and how they’re linked. This type of diagram is also known as an object model diagram in software engineering.

It’s especially helpful when you’re trying to make sense of how a system behaves in a real-world scenario, debug tricky edge cases, or simulate situations that only occur under specific conditions. In OOAD (Object-Oriented Analysis and Design), object diagrams serve as a powerful way to illustrate the system’s runtime structure and validate your class design.

What Can You Do with the UML Object Diagram?

Visualize Runtime Object States

Object Diagrams show what’s happening in your system at a specific point.

Validate Class Diagram Design

Sometimes the theory looks good, but things fall apart in practice. This helps check if your design holds up.

Debug Runtime Issues

Use an object diagram to trace how objects interact when things go wrong.

Document Real-World Use Cases

Explain your system to a client or teammate by showing a real example, not just abstract concepts.

Model Edge Cases and Conditional Behavior

Test how your design behaves in odd or rare situations, like empty carts or bulk orders.

Looking for Real-World Use Cases?

Explore how teams use Sparx EA to solve real problems. From architecture modeling to test design, see what’s possible with ready-to-apply solutions.

Class Diagram vs Object Diagram: Key Differences

Feature Class Diagram Object Diagram
Purpose Shows the structure of your system Shows what’s happening right now
Focus Classes, their properties, and links Actual objects and their real-time connections
Level of Detail Design-level overview Instance-specific details
Timing Design time (before implementation) Runtime or during test scenarios
Application Planning architecture Debugging and behavior analysis

Elements and Connectors of a UML Object Diagrams (with Sparx EA Examples)

Before you begin modeling with UML Object Diagrams in Sparx Systems Enterprise Architect, it’s helpful to understand the kinds of elements and connectors you’ll be working with.

UML Object Diagram Elements

UML Element Type Icon in EA Toolbox Description
Actor uml class element in ea toolbox Actor is a user or external system that interacts with your application through defined roles.
Object uml interface element in sparx ea toolbox An instance of a class, showing specific data values and links to other objects at runtime.
Collaboration datatype element in uml ea tool A Collaboration element represents a group of related objects that work together to carry out a specific task.
Collaboration Use uml enumeration element Applies a collaboration pattern to a particular use case or context in the model.
Boundary primitive uml class element Represents the user interface or a system boundary where interaction with users happens.
Control uml class signal element Handles logic and decision-making in the system, coordinating the flow between other elements.
Entity uml association class element Stores data or information that persists across system operations, like a database record.
Association (n-ary) uml association class element Connects multiple elements in a single relationship, useful for modeling complex scenarios.

UML Object Relationships

UML Connector Type Icon in EA Toolbox Description
Information Flow uml associate connector Shows how information moves between objects, often reflecting data exchange or communication.
Association uml generalization connector Links objects to indicate a structural relationship, like one object referencing another.
Dependency uml compose connector Reflects that one object relies on another, often for functionality or lifecycle awareness.

Want to Gain Deeper Understanding about UML?

Get hands-on training in UML modeling with Sparx EA. Whether you’re just starting out or refining your skills, our expert-led sessions help you build diagrams with confidence.

An Example UML Object Diagram of an Online Order Management System

The diagram above shows a snapshot of an Order Management System at runtime. It visualizes three accounts—two for Joseph Osborne and one for Francis Redfield. Each account is associated with specific orders, and those orders are composed of line items.

Take Ord-2005-10-31-JO-01, for example. This order belongs to Joseph Osborne and contains two line items:

  • Item01 with a quantity of 2, linked to a StockItem titled UML for Beginners by Dave Newbie.
  • Item02 with a quantity of 1, tied to Software Development with UML by Ken Lunn, priced at $30.00.

Each object box in this diagram reflects not only the relationships between objects (Account → Order → LineItem → StockItem), but also the specific values held by those objects at runtime. These include titles, authors, list prices, and item quantities.

By visualizing this information as an object diagram in UML, both developers and analysts gain clarity on how the system is behaving—not in theory, but in practice.

How to Create UML Object Diagram Using Sparx EA

Here’s a quick guide to building an object diagram in software engineering using Sparx Systems Enterprise Architect:

  • Create a New Package and Add a New Object Diagram by selecting Add Diagram > UML Structural > Object Diagram.
  • In the Project browser, expand the package containing your Class Diagram and select elements that you would like to instantiate.
  • Drag & Drop the selected elements onto your Object Diagram.
  • In the ‘Paste Order’ dialog, enable ‘Select for All‘ and ‘Copy Connectors‘ as required then click ‘OK‘.
  • Use Layout Tools to tidy up your diagrams.
  • To set Run State for your Object elements, right click on it and navigate to Features > Set Run State.
  • Enter the required attribute values and close the Features window.
  • Save the diagram and use it in your documentation or reports.

Need Help with Implementing Sparx EA in Your Organization?

Talk to our consultant about your challenges. We’ll help you streamline your modeling projects and maximize ROI with ease.