By adding class operations, you can model the behavior of the classes from the data model. For class operations, you can select from different types of implementation:
-
Activity Diagram (explained on this page)
-
Mapping Diagram (refer to Modeling Data Mapping for more information)
-
Action Script (refer to Using Action Script for more information)
-
JavaScript (refer to Using JavaScript for more information)
An activity diagram is a graphical representation of a workflow. Step-by-step, you can define the actions to be performed. By using decisions, local variables, and more, you can implement complex behavior.
Creating an Activity Operation
To create an activity operation, use the quick action Create a new activity operation of a class:
Enter a name for the operation and click Save:
Restrictions on Element Names
A process name must be unique within one service. In addition, the following name restrictions apply to all service panel elements:
Element names...
-
... must not be empty.
-
... must not contain spaces. Exception: Spaces are allowed in operation names.
-
... must not start with numbers.
-
... must not contain a dot ( . ).
-
... must not contain any special characters. Exception: Operation names may end with a slash ( / ).
-
In addition, Action Script commands and some system-relevant strings (refer to Reserved Words) cannot be used as element names.
Your input is validated: If the name you enter violates these restrictions, the field in the editor turns red and cannot be saved.
Alternatively, you can open the context menu of the class and select Create > Operation:
The dialog Create Operation opens. Select Activity from the drop-down list of available implementation types, enter a name for the operation and click Save to create the operation:
The new operation is added to the class. It opens automatically in a new Designer tab, and you can directly start modeling your activity:
Refer to Working with the Activity Editor for detailed information.
Once the operation has been created, you can use the quick actions and the context menu to manage it:
You can:
-
add parameters
-
in
-
out
-
return
-
-
add suboperations
-
open the implementation of the activity diagram
-
cut the operation
-
copy the operation
-
paste the operation (available if Copy or Cut option have been used before)
-
rename the operation
-
delete the operation
Refer to Implementation and Modeling Data Structures for more information on your options and how to create classes and operations.
Overview on the Activity Diagram Editor
When you create a class operation that is implemented by an activity diagram, the activity diagram editor opens:
Use the various functionalities of the activity diagram editor to model your activity:
|
Name |
Description |
|
|---|---|---|
|
(1) |
Activity Editor |
The activity editor is where you model your activity diagram.
|
|
(2) |
Elements Toolbar |
The elements toolbar contains all UML elements that you can create on the diagram pane.
|
|
(3) |
Model Toolbar |
The model toolbar assists you during modeling on the diagram pane.
|
|
(4) |
Designer Panels |
In the activity diagram editor, the following panels assist you during modeling:
The following panel is hidden by default. If you use the panel preset, you can find the icon to open this panel in the right upper corner of the diagram panel:
|
Attributes of an Activity Operation
Select an activity operation in the Implementation folder of the service panel to display its attributes in the Attributes panel. You can also edit them there:
Activity operations have the following attributes:
|
Attribute |
Description |
Possible Values / Example |
|
|---|---|---|---|
|
Name |
Click here to change the Name of the related operation. Activity operation names must follow certain naming rules. They
|
checkSupportManager |
|
|
Description |
If you want to insert or change a description for the respective activity operation, click here to open a text editor where you can enter and format your text. |
|
|
|
Is static |
Specify if the operation is static (default) or not.
For more information, also refer to Adding Operation Calls. |
true |
The activity operation is static (default) and can be used outside the context of the related class. |
|
false |
The activity operation is non-static and needs a self object as an input. |
||
|
Extensions |
By clicking Add, you can add extensions to an activity operation.
|
REST |
|
Attributes of an Activity Diagram
When you click on the diagram pane in the Activity editor, the following attributes of the current activity diagram are displayed in the Attributes panel. All attributes are read-only and cannot be edited:
|
Attribute |
Description |
Possible Values / Example |
|
|---|---|---|---|
|
Name |
Displays the name of the current activity diagram. |
checkSupportManager
|
|
|
Type |
Path within the implementation folder where the corresponding activity operation resides. |
Service.SupportManagerService
|
|
Related Content
Related Documentation: