Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WBRIDGE and version 24.0

Otp

Names

All object and attribute names in Action Scripts must follow the syntax:

Code Block
languagenone
[a-zA-Z]([a-zA-Z0-9])*

However, UML names are not restricted and may contain any character. To use these names in Action Scripts apply backticks as follows:

Code Block
languagenone
`UML name`

Examples can be found in the table below. Consequently, the only characters not allowed in UML names used in Action Scripts are backticks (`).

UML TypeUML NameUsage Example
Class attributestrange name having blanks and dots: ...object.`strange name having blanks and dots: ...`;
Class attributea-bobject.`a-b`;
Operation::my strange operation name::object.`::my strange operation name::`();
Parameteräparamset `äparam` = "test";
Objecta//bcreate `a//b`;
Object17_namecreate `17_name`;
Note
iconfalse

If the Action Script Editor is used, the escaping is done automatically.

If attribute names have an uncommon syntax because they have to be serialized into XML documents, flat files, IDocs and so forth, it is possible to use the tagged value externalName on attributes to hold the external name. If this tagged value is used, the UML attribute can be renamed to whatever name is convenient without affecting the external representation of the attribute.

Scripting Style

Operations can be scripted in an object-oriented or a procedural syntax style. The differences are shown in the table below, which provides some examples.

Object-Oriented StyleProcedural Style
myVariable.exists();exists(myVariable);
myDataItem.myAttr.exists();exists(myDataItem.myAttr);
s.substring(0, 5);substring(s, 0, 5);
set aString = s.substring(0, 5).toUpper();set aString = toUpper(substring(s, 0, 5));

We recommend deciding for either of these alternatives to keep a clean scripting style throughout your project.

Case Sensitivity

All operations, statements, variable names, class names, and attribute names are case sensitive, e.g.

  • The variables myVar and myvar are two different variables.
  • The E2E Model Compiler will not recognize the assignment statement Set you need to write set in lowercase instead.

Reserved Keywords

In Action Script Language, the following keywords should not be used as variable names as they are reserved for Action Script execution:

Section
Column
width10%
  • and
  • append
  • apply
  • array
  • by
  • catch
  • create
  • distinct
  • each
  • else
  • errorCode
  • errorType
Column
width10%
  • false
  • first
  • from
  • group
  • if
  • last
  • like
  • local
  • NULL
  • or
  • reduce
  • select
Column
  • set
  • single
  • sort
  • then
  • to
  • true
  • unlike
  • use
  • using
  • where
Panel
titleOn this Page:
Table of Contents