Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Cameo Simulation Toolkit supports the following scripting languages

  • ECMLScript/Javascript JavaScript Nashorn (defaultdeprecated)
  • Beanshell
  • Groovy
  • Python
  • Ruby

...

Predefined variables in an Action script represent a set of variables defined by the script engine before a script evaluation is executed. You can refer to these predefined variables from any action script API.

VariableDescription

$context$ or _context_

A context or runtime object of a current script evaluation.

$element$ or _element_

An owner element of the script.

$signal$ or _signal_

The last signal Instance in an Event pool of a specified object.

$state$ or _state_

An active State of a context or a runtime object of a current script evaluation.

$token$ or _token_

A token value of an active model element.

$session$ or _session_To get a running session from the script.
self

Equivalent to $context$ or _context_.

sig_ + "property name"

The specified property value of the last signal

This section explains the existing predefined variables of Action Scripts and demonstrates the use of ALH scripting with the following APIs

  • Getting a Structural Feature Value
  • Specifying a Structural Feature Value
  • Calling a Specific Behavior
  • Calling a Specific Operation
  • Creating a Run-time Object
  • Creating a Signal Instance
  • Sending a Signal Instance to a Specific Target Object
  • Getting a Token Value
  • Getting the Current State of a Run-time Object
  • Getting the Last Signal Instance from a Run-time Object
  • Evaluating an Expression
  • Creating an ArrayList in Java
  • Checking the State of an Object
  • Adding a Value to an Object
  • Removing a Value of an Object
  • Getting a Context
  • Accessing Current Simulation Time
  • Accessing the Simulation Time Unit
  • Adding a Value to a Global Variable
  • Getting a Value from a Global Variable
  • Removing a Defined Global Variable
  • Checking an Existing Global Variable

...

.