![]() |
|
![]() ![]() ![]() |
Nodes and Palette Options > Detailed Palette Option Descriptions > Operation | |
![]() |
Operation ![]() |
Type
Data item
Available from
Data Node only
Purpose
The Operation item, labeled Undefined Data Operation in the subflow, makes it possible to manipulate the values of variables in a variety of ways.
Behavior
The Operation item takes the value of a variable or variable field and manipulates it according to the selection of the Type property. When you select the type, the name of the Operation item changes to match the type. The Avaya Properties view also changes to reflect the additional properties associated with that type.
The specific behavior of each defined type is described in the "Operation Item Property Types" table that follows.
Properties
The properties of the Operation item depend on which Type you assign to the item. Only one property is common to all variants of the Operation item: the Type property. What is selected for this property determines what other properties are available. The following table lists all the available types, along with the other properties associated with each type:
Each of the following types performs an arithmetic operation on two number values and returns the result to the destination variable. Add - Adds the value of the left operand and the right operand. Subtract - Subtracts the value of the right operand from the left operand. Multiply - Multiplies the value of the left operand and the right operand. Divide - Divides the value of the left operand by the right operand. Modulus - Divides the value of the left operand by the right operand and returns the value of the remainder, if any. | Select the variable to which you want to assign the return value of the operation. If this variable is a complex variable, you must also select a Destination Variable Field. | |
Select the variable to use as the left operand. If this variable is a complex variable, you must also select a Left Operand Variable Field. If you use this property, you cannot use the Left Operand Constant property. | ||
Enter in this field the integer value to use as the left operand. If you use this property, you cannot also use the Left Operand Variable property. | ||
Select the variable to use as the right operand. If this variable is a complex variable, you must also select a Right Operand Variable Field. If you use this property, you cannot also use the Right Operand Constant property. | ||
Enter in this field the integer value to use as the right operand. If you use this property, you cannot also use the Right Operand Variable property. | ||
Append To Collection - Appends the value of a source variable to the end of a collection in the destination variable. For information about collections in variables, see Working with Variables. | Select the variable containing the collection to which you want to append the new entry. | |
Select the variable containing the value you want to append to the collection. | ||
Assign - Takes the value of the source and assigns it to the destination. If no source value is specified, that is, all three Source... fields are left blank, the system assigns the value of an empty string to the destination variable. | The variable that the source value is assigned to . If the destination is a complex variable, a field must be selected. | |
Select the variable to assign to the destination. If this variable is a complex variable, a Source Variable Field must be selected whose value should be assigned to the destination. If this property is used, the Source Constant property cannot be used. | ||
Enter the constant value you want to assign to the destination variable. If this property is used, the Source Variable property cannot be used. | ||
Concatenate - Concatenates to, or adds to the end of the value of, the destination variable or variable field. Usually, the variable or variable field value is of type String. Because this is a String-based operation, you can concatenate numbers, but they are then string-based numbers. For example, if you concatenate a 3 to a 4, you end up with the value 34. | Select the variable to which the source value is to be concatenated. If the destination is a complex variable, you must also select a Destination Variable Field. | |
Select the variable (and field if Source Variable is a complex variable) whose value is to be concatenated to the destination. If the source is a complex variable, you must also select a Source Variable Field. | ||
Enter the constant value you want to concatenate to the destination variable. If this property is used, the Source Variable property cannot be used. | ||
Decrement - Subtracts one (1) from the value of the destination variable or variable field. The destination variable must be of the type integer. | Select the variable whose value is to be decremented. If this variable is a complex variable, you must also select a Destination Variable Field. | |
Delete All From Collection - Removes all items from a collection variable. For information about collections in variables, see Working with Variables. | Select the collection variable. All entries in the collection will be cleared. | |
Delete From Collection - In a collection, deletes the entry that is at the current position of the collection pointer. For information about collections in variables, see Working with Variables. | Select the variable containing the collection from which you want to delete the entry. | |
Increment - Adds one (1) to the value of the destination variable or variable field. The destination variable must be of the type integer. | Select the variable whose value is to be incremented. If this variable is a complex variable, you must also select a Destination Variable Field. | |
Index Of - Returns the index of a substring from a larger string. | The variable (or field if variable is complex) that stores the index of the "String". If the "String" value does not exist in the Source Variable (or field if complex), then this value will be -1. NOTE: index is 0-based-that is the first character is index 0. | |
The source variable-the value of this is searched to find the start index of "String" if it exists. | ||
The string to search the source variable for. For example, Index of "Fran" in "San Francisco" would return 4. Index of "Den" in "San Francisco" would return -1. | ||
This is used to skip over preceding characters in the string before searching for the first occurrence of "String". You can either use a constant value, or supply a variable that contains a valid index to start from. This will throw a runtime exception if the "start from" value is invalid. For example: Index of "a" in "Hawaii" with start from "2" would return 3. Index of "a" in "Hawaii" with start from "10" would throw an exception because the start from index exceeds the length of the string. | ||
Insert Into Collection - Inserts the value of a source variable into a collection in the destination variable at the current position of the collection pointer. For information about collections in variables, see Working with Variables. | Select the variable containing the collection into which you want to insert the new entry. | |
Select the variable containing the value you want to insert into the collection. | ||
Insert String - This function is similar to concatenate, but where concatenate appends one string to the end of another, Insert String will insert the contents of one string into another at a specified position. For example if Destination Variable has the value "car" and Source Variable contains the value "race", and Index Constant is 0, then the value of Destination Variable would result in "racecar". | The variable whose value will have the string contents of Source (variable or constant) inserted. If the Destination Variable is a complex variable, select the field whose value is to be incremented. | |
The variable whose value will be inserted into the destination variable's value. If the source is a complex variable, a field must also be selected. | ||
The constant value (hardcoded) that will be inserted into the destination variable's value. | ||
the variable that contains the index (zero-based) where the source var/const will be inserted into the dest. var. This must be an integer. If the value is less than zero, it is automatically adjusted to be zero. If the value is larger than the length of the destination variable, then it is automatically adjusted to add the string to the end of the destination variable; effectively becoming a concatenation operation. If the index variable is complex, a field must also be selected. | ||
Length - Returns the number of characters in a source variable string, and assigns that number to the destination variable. | Select the variable to which the source length is to be assigned. If this variable is a complex variable, a Destination Variable Field must also be selected (the field to which the source length is to be assigned). | |
Select the variable whose length you want to assign to the destination variable. If this variable is a complex variable, you must also select a Source Variable Field (the field whose length you want to assign to the destination variable). | ||
Next in Collection - Returns the value of the next item in the collection. For information about collections in variables, see Working with Variables. | Select the variable that contains the collection. At run time, when the application reaches the end of the collection and there are no more items to return, the system would normally throw a run-time exception. To prevent this, place a Condition item in the node subflow before this item, and:
| |
Parse - Uses the separator character to break a string into smaller strings. Returns the resulting smaller strings as a collection in the destination variable. For information about collections in variables, see Working with Variables. | Select the variable to which you want to assign the collection that results from the parsing action. | |
Select the variable that contains the string you want to parse. If this variable is a complex variable, you must also select a Source Variable Field (the variable that contains the string you want to parse). | ||
Enter the character you want to use as the trigger to break the string into smaller strings. For example, suppose your original string was "Parse this variable," and you used a space as the separator. This operation returns the three words "Parse", "this", and "variable". It then returns the results as a collection with the three words as items in the collection. | ||
Previous In Collection - This is the inverse of Next in Collection. It moves the collection iterator to the item prior to the current item. |
The variable that will contain the HEX encoded value of the source variable. If this variable is a complex variable, a Destination Variable Field must also be selected. | |
The source variable whose contents will be encoded where each character will be represented with its ASCII character code. If this variable is a complex variable, a Source Variable Field must also be selected. | ||
Removes all occurrences of a designated character from the source variable and writes the new value of the variable to the destination. | Select the variable to which you want to write the new value. If the Destination Variable is a complex variable, select the field to which you want to write the new value. | |
Select the variable from which you want to remove all occurrences of the designated character. If the Source Variable is a complex variable, select the field from which you want to remove all occurrences of the designated character. | ||
Enter in this field the character you want to remove from the source variable or variable field. | ||
Reset Collection - Returns the item marker for the collection to the beginning of the collection. For information about collections in variables, see Working with Variables. | Select the variable whose collection you want to reset to the beginning. | |
Set Datetime - Takes the value of the date (and optionally, time) variable and assigns it to the destination. | Allows users to assign the date and time variables to a destination variable. The destination variable then automatically converts the values contained in the date and time variables into a Java Date object, which is carried throughout the session. | |
A complex variable that must contain the day, month, and year fields. Users create this variable and assign numeric values to its fields or they use the built-in date variable for system date. | ||
A complex variable that must contain the hour, minute, and second fields. Users create this variable and assign numeric values to its fields or they can use the built-in time variable for system time. This property is optional. | ||
Set Null - Sets the value of the variable to null. NOTE: Session variables cannot be null, so by default, they are initialized as empty strings (""). In order to pass null values to database operations or web services, "Set Null" will assign a special value ("__DD_NULL") to the session variable which is interpreted as null by the runtime for web services and databases. Likewise, if a database or web service operation returns a null value, then the runtime will set the value of the session variable to "__DD_NULL" to prevent Null Pointer Exceptions. | Select the variable to be set to Null. If this is a complex variable, a Destination Variable Field must also be selected. If the Destination Variable is a complex variable, select the field to be set to null. If the Destination Variable is a simple variable, this list is not populated. | |
Size - If the source variable is a collection, returns the size of the collection. That is, this type returns the number of items in the collection. If the source variable is not a collection, returns 1. For information about collections in variables, see Working with Variables. | Select the variable to receive the return value. If this is a complex variable, you must also select a Destination Variable Field. If the Destination Variable is a complex variable, select the field to receive the return value. If the Destination Variable is a simple variable, this list is not populated. | |
Select the variable that contains the collection to be counted. | ||
Sort - Takes the contents of a variable or variable field and sorts the collection in ascending or descending order. The variable or variable field must contain a collection for this operation to be meaningful. For information about collections in variables, see Working with Variables. | Select the variable whose contents you want to sort. If the variable is a complex variable, you must select a Destination Variable Field as well (the field whose contents you want to sort). | |
| ||
String To ASCII Hex - Converts a string to its cooresponding ASCII Hex character code. It is primarily intended as a utility method when sending data that must be hex-encoded via SIP headers such as when sending AAI data in a transfer. For example: the value "7654321" would result in "37363534333231" (7->37, 6->36). Refer to an ASCII character chart to see the full list of hex ASCII character codes. NOTE: Networks may handle SIP data differently; hex encoding is recommended, but may not work in all environments depending on the switch and other elements in the network. | Select the variable that will contain the HEX encoded value of the source variable. If the Destination Variable is a complex variable, a field must also be selected. | |
Select the variable whose contents will be encoded where each character will be represented with its ASCII character code. If the Source Variable is a complex variable, a field must also be selected. | ||
Sub String - Returns a part of a string in the source variable and assigns it to the destination variable. The source variable must be of type string. Note: The index for a Sub String operation is zero-based. This means that you count the first character as zero (0) and go on from there. For example if you wanted to take the substring "truck" from the word "firetruck," you must use a Start Index of 4 (the fifth character) and Number of Characters of 5. Note that, in this case, for Number of Characters, you can also enter -1 (see Number of Characters description). | Select the variable to which you want to assign the substring. If the Destination Variable is a complex variable, select the field to which you want to assign the substring. | |
Select the variable from which you want to select and return the substring. If the Source Variable is a complex variable, select the field from which you want to select and return the substring. | ||
Enter in this field the point in the string at which the substring starts. For example, if you want the substring to start at the seventh character in the string, enter 6. You can use a variable for the Start From rather than a hard coded value. If Start From variable is complex, then you need to provide a field. | ||
Enter in this field the maximum number of characters to include in the substring that is returned. If the string has fewer than this number, it returns a shorter substring. If you enter -1 in this field, the operation returns all characters starting with and following the index. For example, if you wanted to remove the first three digits from an account number that might have a variable number of digits, you would set the Start Index to 3 and set the Number of Characters to -1. The default for this field is -1. You can use a variable for the number of characters to extract rather than a constant. If the Num Chars variable is complex, then you must select a field. | ||
The variable that receives the lower case converted string. If the Destination Variable is complex, a field must also be selected. | ||
The variable whose value will be converted to all lower case. The converted result is stored in the Destination Variable. If the Source Variable is complex, a field must also be selected. | ||
The variable that receives the upper case converted string. If the Destination Variable is a complex variable, a field must also be selected. | ||
The variable whose value will be converted to all upper case. The converted result is stored in the Destination Variable. If the Source Variable is a complex variable, a field must also be selected. | ||
Trim Whitespace - Removes the whitespace from the beginning and end of strings. For example: " Hello World " would become "Hello World" after the trim whitespace operation. | Select the variable that will contain the results from the trimming action. If the destination is a complex variable, a field must be selected. | |
Select the variable (and field if Source Variable is a complex variable) that contains the string before the trim operation. | ||
Set Current Language - Sets the project language. Note: If you have entered a language that does not exist or does not match with any project language, then a SCERuntimeException is generated. | ||
![]() ![]() ![]() |
©2009, Avaya Inc. All rights reserved.
|