Book a Demo
Prev Next

Interaction Operand Condition and Message Behavior

When you simulate the behavior of a Sequence diagram, you can use a Condition for the CombinedFragment Interaction Operand, to control the flow during the course of the Simulation.

A Message in Sequence diagram can link to an Operation, so the behavior of the Operation can also be used during the course of the Simulation.

Interaction Operand Conditions

Field/Column

Description

See also

Operand Condition

Interaction Operand Conditions are conditional statements that are evaluated whenever the Simulator has to determine which path to take next. Operand Conditions typically have these characteristics:

  • Defined in the 'Combined Fragment' dialog
  • Written in JavaScript
  • Can refer to variables defined during Simulation

Adding Operand Conditions

To add an Operand Condition:

  1. Double-click on the CombinedFragment element to open the 'Combined Fragment' dialog.
  2. Click on the New button.
  3. In the 'Condition field', type the JavaScript for the condition.
  4. Click on the Save button.
Combined Fragment conditions using Javascript

Evaluation Semantics

During execution the Simulator evaluates any Operand Condition within the CombinedFragment; the CombinedFragment type and the outcome of the evaluation can determine the path that the Simulation continues on.

Learn more