On this page

Magic Model Analyst provides an Activity simulation engine that allows you to run an Activity Simulation on Activity diagrams or Activity Elements. Magic Model Analyst also includes the implementation of OMG Semantics of a Foundational Subset for Executable UML Models (fUML), an executable subset of standard UML, that can be used to define the structural and Behavioral semantics of systems. fUML defines a basic virtual machine for the Unified Modeling Language and supports specific abstractions enabling compliant models to be transformed into various executable forms for verification, integration, and deployment. 

Various UML Activity diagram concepts are supported, including Object and Control Flows, Behavior and Operation Calls, sending Signals via Connectors with or without Ports in Internal Structure, accepting Signals and Time Events, Pins, Parameters, Decisions, Structured Activity Nodes, and many more. 

The Activity simulation engine features include the following

  • fUML 1.3 specification support.
  • Any Action languages in opaqueBehaviors, opaqueExpressions, Decisions, Guards, and Constraints (see Integration with MATLAB® for more details).

  • CallBehaviorAction with nested diagrams simulation and animation.
  • SendSignalAction to send a Signal to a global Event queue to be consumed by any other engines, e.g., State Machine.
  • CallOperationAction through a Port.
  • Sending Signals through a Port.
  • Support for Decision Nodes with probabilities over all outgoing edges.
  • Support for Decision Nodes with a Decision input that provides input to Guard specifications on outgoing edges from each Decision Node. 
Supported Decision Input forDecision NodesThe supported Decision input for Decision nodes.

Note

  • You can simulate only Activities that are owned by a Package or a Class. As a workaround, the CallBehavior Actions, owned by the Call Behaviors in a Package, will be used for the entry/do/exit Behaviors in States.
  • The Guards on an ObjectFlow are not Boolean expressions in fUML. They should contain a value that matches the runtime value that flows on the ObjectFlow during simulation.


To change to a regular UML (Boolean expression)


  1. On the main menu, click Options > Environment and select Simulation on the left of the Environment Options dialog.
  2. Select the Use fUML DecisionSemantics value check box so that the value becomes false. The value is false by default in the UML mode.


  • A decision value can be passed as a parameter of Behavior of an opaque expression through a pin of Action. If a valid return value is from an assigned Behavior of a Guard, the body of the Guard will be ignored. However, if the Behavior is <unspecified>, the body of the Guard will be used.


Most of the elements on an Activity diagram are supported as follows

  • Control Flow
  • Object Flow
  • Input Pin
  • Output Pin
  • Activity Final Node
  • Flow Final Node
  • Activity Parameter Node
  • Decision Node
  • Merge Node
  • Join Node
  • Fork Node
  • Structured Activity Node
  • Conditional Node
  • Loop Node
  • Expansion Region
  • Expansion Node
  • Object Node  
  • Central Buffer Node 
  • Data Store Node 
  • Actions
  • AcceptEventAction
  • AddStructuralFeatureValueAction
  • CallBehaviorAction
  • CallOperationAction
  • ClearAssociationAction 
  • ClearStructuralFeatureAction
  • CreateLinkAction
  • CreateObjectAction
  • DestroyLinkAction 
  • DestroyObjectAction 
  • OpaqueAction
  • ReadExtentAction
  • ReadIsClassifiedObjectAction
  • ReadLinkAction
  • ReadSelfAction
  • ReadStructuralFeatureAction
  • ReclassifyObjectAction 
  • ReduceAction 
  • RemoveStructuralFeatureValueAction
  • SendSignalAction
  • StartClassifierBehaviorAction
  • StartObjectBehaviorAction
  • TestIdentityAction
  • ValueSpecificationAction 

ReadLine support

ReadLine is a function that allows the user to enter value through the input line on the Console pane. A Call Behavior Action can be set Behavior as ReadLine [fUML_Library::BasicInputOutput] using fUML_Library.mdzip from the Use Project dialog. Before using the ReadLine function, you need to include fUML_Library.mdzip in the project first.

To open the Use Project dialog and include fUML_Library.mdzip


  1. Click File > Use Project > Use Local Project from the main menu to open the Use Project dialog.

2. In the Select a project to use area, select the From predefined location option.

3. In the Paths to used projects list, select <install.root>\modelLibraries.

4. In the directory tree list, select fUML-Library and click Next> to proceed to the next step.

5. You will be at the Specify usage options step. Click Finish. The Question dialog opens to ask you about showing auxiliary resources in the Containment tree. Click Yes.


Then a Call Behavior Action can now be set Behavior as a ReadLine Element. The ReadLine Element will be shown with two default Pins, i.e., result and errorStatus. During the simulation, the ReadLine Element is executed to allow entering value through the input line on the Console pane. The result of the ReadLine Element can be used by other Elements with any proper data types, e.g., Guard, as in the following figure

ReadLine support allows entering value through the input line on the Console pane.