Page History
Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Otp |
---|
The following operations in this section are array operations. They are used to manipulate and access arrays:
...
Operation |
---|
...
Description | |
---|---|
[ ] | The bracket operator can be used to get and set array elements. |
append | appends elements to arrays. |
apply | applies E2E Action Language operations to array elements. |
buildMap() | builds a map from an array. |
concatArrays() | concatenates the elements of one or more arrays to a target array. |
count() | counts the number of elements in an array. |
getMapEntries() | gets all map entries to an array (see chapter Map Operations). |
join() | concatenates all strings of an array of strings and separates them a separator. |
reduce | reduces array valued types to scalars. |
select | filters array items by evaluating a boolean expression for each array element using an SQL like syntax. |
sort | sorts array elements in defined order. |
Note | ||
---|---|---|
| ||
All Any type operations listed on Any Type Operations also apply to arrays. |
The following pages describe the above operations in more detail. More information about arrays can be found in section Base Types.
Note | ||
---|---|---|
| ||
Arrays containing array elements of type Array are not supported by the Bridge. |
Creating Arrays
Multiexcerpt | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
You can create arrays using the
However, most of the time the E2E Runtime will create the array implicitly on appending the first item. There is one exception to this rule, though: Arrays that contain array elements having a complex type with multiplicity.
|
Some Array How-tos
Find below a list of some useful code snippets in array context:
Task | Code Snippet | Descriptions | ||
---|---|---|---|---|
empty array |
| A new array is created containing all references to elements of
| ||
| The reference of In the UML model, you will have now a non-existent array. You can append items using the append statement, the array will implicitly be created, then. | |||
copy all content from array1 to array2 |
| A new array is created containing all references to elements of In the UML model you will now see two arrays | ||
| A new array is created that contains a true deep copy of all elements of In the UML model you will now see two arrays | |||
append all content from array1 to array2 |
| A new array is created containing all references to elements of In the UML model you will now see an array |
Panel | ||
---|---|---|
| ||
|