When creating class operations to your own data model in the Implementation folder, you can select from the following different types of implementation:
Mapping Diagram: Refer to Modeling Data Mapping for more information about mapping diagrams.
In the Designer, you can use JavaScript operations to effectively write the function body of a (synchronous) JavaScript function.
Please note that await syntax is not supported in synchronous JavaScript functions. |
The fastest way to create an JavaScript operation is via the quick actions of the related class.
Hover over the class you want to add the operation to, and click the Add JavaScript Operation quick action (). | ||
Assign a name to your new JavaScript and click Save. | ||
The JavaScript Editor opens in a new tab. | ||
You can now add JavaScript.
The script you have entered is saved and validated in the background. |
Alternatively, you can add a class operation via the context menu of a class, and create an implementation afterwards.
Right-click the class you want to add an operation to and select Add Operation from the context menu. | ||
The dialog Add Operation opens. Select JavaScript from the drop-down list, enter a name for the operation and click Save. | ||
The new operation has been added to the class. The JavaScript Editor opens automatically in a new Designer tab, and you can start entering JavaScript (see further above).
| ||
Once the operation has been created, you can use the quick actions and the context menu to manage it.
|
Select a JavaScript operation in the Implementation folder of the Service panel to display its attributes in the Attributes panel. You can also edit them there.
| |||||||||||||||||||||||
When you click in the JavaScript Editor, the following attributes of the current JavaScript are displayed in the Attributes panel. All attributes are read-only and cannot be edited there.
|