Versions Compared

Key

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

When creating class operations to your own data model in the Implementation folder, you can select from three different types of implementation:

  • Action Script:The usage of action script is explained on this page.
  • Mapping Diagram:Refer to Modeling Data Mapping for more information about mapping diagrams.

  • Activity Diagram: You can implement class operations by a UML activity diagram. Refer to Modeling Activities for more information on activity diagrams.

The xUML Action Language is a script like language that you can use in class operations to implement atomic actions like manipulating strings, arrays, and so forth. Such class operations are called action script.

Tip

Refer to Action Script Language for a comprehensive documentation of all elements of the xUML Action Language.

Creating an Operation Containing Action Script

Via a Quick Action

The fastest way to create an action script operation is via the quick actions of the related class.

Image Modified

Hover over the class you want to add the operation to, and click the Add Action Script Operation quick action ().

Assign a name to your new action script and click Save.

Image Modified

The Action Script Editor opens in a new tab. 

Anchor
action_script
action_script

You can now add action script.

Tip
titleExpert Advice

Click the help icon () to jump to the documentation of the xUML Action Language for detailed information about the usage of action script. This documentation contains helpful basic information such as

The script you have entered is saved and validated in the background.

Via the Context Menu

Alternatively, you can add a class operation via the context menu of a class, and create an implementation afterwards.

is displayed below the class. Icon Image Removed indicates that this operation has no implementation, yet.Image Removed

Right-click the class you want to add an operation to and select Add Operation from the context menu.

Image Added

The dialog Add Operation opens.

Select Action Script from the drop-down list, enter a name for

Image Removed

In the pop-up, enter the name of

the operation and click Save.Image Removed

Image Added

The new operation

Select Create Implementation from the context menu of the newly created operation.

Image Removed

In the pop-up window, select option Action Script and confirm with Save.

Image Removed

has been added to the class. The Action Script Editor opens automatically in a new Designer tab, and you can start entering action script (see further above).

Tip

Go to Working with the Action Script Editor for detailed information.

Image Added

Once the operation has been created, you can use the quick actions and the context menu to manage it.
You can:

  • add a parameter
    • in
    • out
    • return
  • open the implementation of the action script
  • change the implementation from action script to activity diagram or mapping diagram
  • cut the action script operation
  • copy the action script operation
  • paste the action script operation (available if Copy or Cut option have been used before)
  • rename the action script operation
  • delete the action script operation
Tip

Refer to Implementation and Modeling Data Structures for more information on your options here.