Matches
Returns true if the text matches the specified regular expression.
Property | Type | Description |
---|---|---|
pattern | String | Regular expression. |
text | String |
Max
Returns the maximum number of two numbers (Number1 and Number2). For example: Max: [Number1=4, Number2=3] → [Returns] =4.
Properties | Type | Description |
---|---|---|
Number1 | Number | The first number. |
Number2 | Number | The second number. |
Min
Compares two numbers (Number1 and Number2) and returns the lowest (minimum) number.
Move
Moves data from source to target. (Replaces MoveNumeric, Normalize, Trim, TrimLeading, and TrimTrailing)
Move and the new Transformation Engine
As part of the evolving engine, improved Move rule functionality reduces the need for manual manipulation of your data during transformation by better inspecting and adhering to source and target Schemas. It is more consistent when reading and writing data; whether moving source data into a Ruleset variable, or directly to target, the Move rule respects the data type and other properties set in the Schema.
Trimming and padding of non-essential characters such as zeros and white spaces
Move automatically executes certain trimming, padding, and spacing behavior when moving data. This can be especially helpful when transforming fixed-length Flat Files. For example:
A field in your Flat File Schema has a starting position of “1” with a Length of “10”. The actual data being moved is “xxxxxxxabc”. ("x" represents 7 empty spaces in front of the data). In the old engine, you would need to use the Move Trim rule to handle these spaces. The new Move recognizes these spaces and automatically removes them for you. The target value in this case is “abc”.
Formatting implied decimals in both source and target data
Move also formats implied decimals with less manual intervention. The decimal position is defined in either the source or target Schema for the particular syntax category (Flat File, EDI, or Database, etc). For example:
- For Fixed-length Flat Files, the Move rule uses the Flat File Schema properties Length and Fractional Digits when reading from and writing to implied decimals.
- For delimited Flat Files, Move uses the Flat File Schema property Fractional Digits to read implied decimals.
- When writing implied decimals, Move uses Fractional Digits and Total Digits.
- For target, when the length of data is less than Total Digits, the engine automatically pads the output with zeros. However when data length is greater than Total Digits, an exception will be thrown.
- For EDI (X12), the Move rule uses the EDI Schema settings Min Length and Max Length for implied decimals in source and target. Source numeric data values not containing a decimal will have the decimal point added at the implied position. Target numeric values containing decimal positions equal to the implied value have their decimals removed.
- For Database, the Move rule uses the Database Schema property Fractional Digits and Length when working with ImpliedDecimal JDBC type. Values that contain commas (,) or brackets ([]) will not conflict with keywords and delimiters. The engine removes trailing NULL values at the end of the record.
Converting dates into the new DateTime data type
Move now automatically converts a date into the new DateTime data type. It is also capable of reading dates with values not well-formed.
Better error messages provided when moving incompatible data types or violating other Schema properties.
Below are some examples of error messages that may appear when the engine prevents data from being moved.
Cause of error | Error Message |
---|---|
String exceeds maxLength in target | InvalidDataFormatException: Length of value 'ABCDEFGHIJ' is greater than max length '9' specified in the field 'StringLength10_Max9' |
Moving string to number | Incompatible types. Expected Number but was String. |
Moving decimal to integer | InvalidDataFormatException: The value '555.55' can not be converted to Integer. Field 'IntLength8_Min5'. |
Multiply
Multiplies two values (Factor1 and Factor2) and returns a numeric result.
Property | Type | Description |
---|---|---|
Factor1 | Number | First value. |
Factor2 | Number | Second value. |
RoundingDecimalPositions | Number | Rounds the result "Half Up" if roundingDecimalPositions is not null and >= 0. |
Negate
Returns the negated value of a number.
Property | Type | Description |
---|---|---|
Factor1 | Number | The number to be negated. |
RoundingDecimalPositions | Number | Rounds the result "Half Up" if roundingDecimalPositions is not null and >= 0.
If null then returns Factor1. |
Normalize
Returns a new String replacing all multiple occurrences of white space with a single occurrence. It also trims the original text.
Not
Changes a boolean value from False to True, or True to False.
- If boolean is null, then returns False;
- If boolean is False, then returns True;
- If boolean is True, then returns False.
NotContains
Returns boolean of false if the text contains the specified string (str) value. Returns false if both strings are null.
Property | Type | Description |
---|---|---|
text | String | Specified text. |
str | String | Specified string value. |
Not End With
Returns false if text ends with suffix, otherwise returns true. If both strings are null then returns false.
Property | Type | Description |
---|---|---|
text | String | Specified text. |
suffix | String |
NotStartsWith
Returns boolean of false if text starts with prefix, otherwise returns true. If both strings are null returns false.
Property | Type | Description |
---|---|---|
text | String | |
prefix | String |
NumberEquals
Returns boolean result of true when two numbers are equal (or both are null).
NumberOfMatches
Returns a number.
Property | Type | Description |
---|---|---|
pattern | String | Regular expression. If null, then returns null. |
text | String | If null, then returns null. |
NumberNotEquals
Returns boolean result of false when two numbers are equal (or both are null).
NumberToString
Takes a number from source and converts it to a string so that automatic trimming of leading zeros is prevented.
Property | Type | Description |
---|---|---|
Number | Number | The source number to be padded. |
PaddingDigits | Number | The total number of digits expected in output. (For example: the source value "1" needs to be padded in the output to be “000001”. In this case "6" would be the PaddingDigits. |
CountSign | Boolean | Count or not count the minus sign. Default is true. |
Or
Checks whether up to 10 booleans are true, and returns a boolean.
- Returns true if at least one input boolean is true.
- If all values are null then returns null.
- Returns the boolean result Or for all non null booleans.
RawMove
RawMove transfers data at face value. Unlike Move, it does not facilitate automatic trimming/padding/spacing behavior.
Raw move gets around the new move rule's automatic formatting by moving data literally and regardless of Schema settings. It allows you to retain data intact as it is moved; it can prove helpful when default Move rule formatting is not the desired result.
In this example, the underscore represents empty spaces. RawMove()[_ _ _ _ xyz] -> [_ _ _ _ xyz]
Here the four empty spaces have moved and are intact. Compared to…
Move()[_ _ _ _xyx] -> [xyz]
Note now that the four empty spaced were trimmed when moving to target.
If you are accustomed to the functionality associated with the Move rule for the older transformation engine (in the version 1 Ruleset ), the RawMove can be used instead of Move.
Remainder
Returns the remainder of a division.
Property | Type | Description |
---|---|---|
Addend1 | Number | Dividend. |
Addend2 | Number | Divisor. |
RoundingDecimalPositions | Number | Rounds the result "Half Up" if property is not null and >= 0. If null then returns value. |
ReplaceAll
Replaces occurrences of str in text and returns a new string.
Property | Type | Description |
---|---|---|
text | String | |
str | String | |
replacement | String |
RestoreContext
Context points can be used to pass RDO and ENV variables between a Business Process and a Ruleset, or to backup and restore the data within the Ruleset. RestoreContext updates the variables and the RDO in the Ruleset with the data that is in the Storage Node.
Used in conjunction with the AssembleContext action.
Property | Type | Description |
---|---|---|
ContextPointStorageNode | StorageNode | The Storage Node. |
Example:
- Set a variable to 10;
- Call Assemble Context;
- Change variable to 11;
- Call RestoreContext.
Result: the variable returns to 10.
RetrieveScriptIDFromRoute
Used in conjunction with the ExecuteMessageBusinessProcess and ExecuteRouteBusinessProcess Actions to return the script ID from a Route.
Property | Type | Description |
---|---|---|
RouteID | String | Identifies the Route. |
Split
Returns a new list of strings after splitting the specified text into sub-strings based on a regular expression.
Property | Type | Description |
---|---|---|
pattern | String | Regular expression |
string | String | String to be split. |
Starts With
Returns true if text starts with prefix, otherwise returns false. Returns true if both strings are null.
StringEquals
Compares two strings for equality and returns a boolean.
Property | Type | Description |
---|---|---|
SourceString1 | String | First string. |
SourceString2 | String | Second string. |
StringEqualsNormalized
Returns true if both strings are equal after normalizing them. If both strings are null returns true. If one is null and the other is not returns false.
Property | Type | Description |
---|---|---|
SourceString1 | String | |
SourceString2 | String |
StringNotEqualsNormalized
Returns true if both strings are not equal after normalizing them. If both strings are null then returns false. If one is null then returns true.
Property | Type | Description |
---|---|---|
SourceString1 | String | |
SourceString2 | String |
StringNotEquals
Compares two strings for inequality and returns a boolean.
Property | Type | Description |
---|---|---|
SourceString1 | String | First string. |
SourceString2 | String | Second string. |
Substring
Returns a substring of a string. (Used with SubstringReplace). For example, a substring of the word "computer" could be puter or comp. Another use case would be to take a 10-digit phone number and return only certain digits. Note: The Substring action automatically trims leading spaces.
Property | Type | Description |
---|---|---|
Text | String | Returns null if text is null. Returns an empty string if the text is empty or only has empty spaces. |
Start Position | Number | The position index starts at 1. Defaults to 1 if textStartPosition is null. |
Length | Number | Defaults length to the end of the string if it is null. |
Subtract
Subtracts the first number (subtrahend) from the second number (minuend) and returns a numeric result.
Property | Type | Description |
---|---|---|
SourceNumber1 | Number | subtrahend (number to be subtracted from another). |
SourceNumber2 | Number | minuend (number from which another is to be subtracted) |
RoundingDecimalPositions | Number |
Rounds the result "Half Up" if roundingDecimalPositions is not null and >= 0. Defaults both numbers to zero if null. |
SubtractDateTime
Subtracts two DateTimes and returns a new DateTime.
Property | Type | Description |
---|---|---|
Minuend | DateTime | The DateTime from which another is to be subtracted. |
Subtrahend | DateTime | The DateTime to be subtracted from another. |
Returns the minuend if the subtrahend is null;
Returns null if the minuend is null;
Returns null if both parameters are null.
SubtractDateTimeWithFields
Subtracts the specified values from the DateTime and returns a new DateTime.
Property | Type | Description |
---|---|---|
DateTime | DateTime | |
Year | Number | The year. |
MonthOfYear | Number | The month of the year, from 1 to 12. |
DayOfMonth | Number | The day of the month, from 1 to 31. |
HourOfDay | Number | The hour of the day, from 0 to 23. |
MinuteOfHour | Number | The minute of the hour, from 0 to 59. |
SecondOfMinute | Number | The second of the minute, from 0 to 59. |
SubstringReplace
Replaces a substring within a string.
Property | Type | Description |
---|---|---|
Text | String | Returns null if text is null. |
Text Start Position | Number | The position index starts at 1. Defaults to 1 if textStartPosition is null. |
Text Length | Number | Defaults to the end of the string if textLength is null. |
Replacement | String | Defaults to empty string if replacement is null |
Replacement Start Position | Number | Defaults to zero if start position is null. |
Replacement Length | Number | Defaults to the remaining length of replacement if replacementLength is null. |
Example
- Text = "abcdef"
- textStartPosition is 3
- textLength is 2
- replacement is ABCDEF
- replacementStartPosition is 1
- and replacementLength is 3
Result: "abABCef. The text "cd" has been replaced with "ABC".
SubtractDurationFromDateTime
This task subtracts or decrements Duration from the DateTime value.
Property | Type | Description |
---|---|---|
DateTime | DateTime | The DateTime variable that the Duration will be subtracted from. |
Duration | Duration |
The Duration variable to be subtracted from the DateTime variable. |
- If DateTime is null, then returns null.
- If Duration is null, then returns DateTime.
ToLowerCase
Returns a new string after converting all characters to lower case.
ToUpperCase
Returns a new string after converting all characters to upper case.
Trim
Returns a new string with leading and trailing spaces removed.
TrimLeft
Returns a new string with leading spaces removed.
TrimRight
Returns a new string with trailing spaces removed.
Comments
0 comments
Please sign in to leave a comment.