Contents

Icon

This section is about Pre-built functions. To know about extending funclets by adding new Java/JavaScript funclets, refer to the Extending Funclets section.

Fiorano eMapper provides an easy to use graphical user interface – the Visual Expression Builder, used for building simple or complex expressions using several predefined functions. All this can be done by performing simple drag-n-drop of required functions, input nodes and connecting them visually.

The Funclet View provided in the Fiorano eMapper Perspective consists of the Visual Expression Builder. The Visual Expression Builder is shown automatically upon clicking on any node in the Output structures. The Visual Expression Builder consists of two areas:

  1. Function palette: A palette listing various functions that can be used while defining mappings between input and output nodes.
  2. Funclet easel: A canvas where the user can define mappings by adding functions from the palette and nodes from the input and output trees.

The Funclet View displaying a mapping is shown in the figure below.


Figure 1: Funclet View
The mapping shown in above figure concats the values of two nodes from the input structures ( and ) with some constants ( ) using pre-defined string functions ( ) to obtain the value of a node in the output structures ( ).
A mapping usually has:

  1. Destination node
  2. Function nodes (optional)
  3. Source nodes (optional)

Funclet Easel

The Funclet Easel is the basic work area for creating expression based mappings. Function nodes, as well as Source or Destination nodes, can be placed in this area to create mappings as per requirement.


Figure 2: Funclet easel

Source and Destination Nodes

Source Node

The Source node corresponds to a node in the Input structures Panel. A Source node is shown in the figure below.

 Figure 3: Source Node

Destination Node

The Destination node corresponds to a node in the Output structures Panel. A Destination node is shown in the figure below. 


Figure 4: Destination Node

Adding Source node to Funclet easel

After selecting a destination node from the Output Structures panel, drag-and-drop the source node from the Input Structures Panel to the Funclet easel.


Figure 5: Adding Source node to Funclet easel

Adding Link between two Nodes

To make a link between two nodes placed on the Funclet easel, follow the steps below:

  1. Drag from the extreme right end of the source node.


    Figure 6: Source node
     
  2. Drop the mouse to the Destination node's input point, which is represented by a gray box.


    Figure 7: Linking the Source and the Destination node

Adding Function node to Funclet easel

  1. Click the Function node on the Function palette which is to be placed on the Funclet easel.


    Figure 8: Selecting the Function node
     
  2. Now, move the mouse onto the Funclet easel. This changes the mouse to a?? '' sign, representing that the corresponding function node is selected.
  3. Now click on the Funclet easel. This places the corresponding function node building block on the Funclet easel.

Alternatively,

  • Drag-and-Drop the function node from Function palette to the Funclet easel.


Figure 9: Funclet easel

Adding Link between two nodes

To make a link between two nodes placed on the Funclet easel, follow the steps below:

  1. Click on the gray box on the source building block; a small circle appears. This represents the starting point of the link and the output box of the building block.


    Figure 10: Source node
     
  2. Now drag-and-drop the mouse to the destination node's input point, which is again represented by a gray box. A big circle appears on the destination node.


    Figure 11: Linking the Source and the destination node

  3. Release the mouse; a link between the two nodes is created.


    Figure 12: Linking Source and Destination nodes

Deleting link between two nodes

To delete a link between two building blocks,

  1. Click on the ending point of the link and drag it to an empty area in the Funclet easel.


    Figure 13: Deleting link
  2. Now, release the mouse. This removes the link between the corresponding nodes.

Deleting node from Funclet easel

  1. Select the corresponding building block and right-click on it; the shortcut menu appears.


    Figure 14: Pop-up menu
     
  2. Click Delete to delete the selected building block.
Icon

Destination node cannot be deleted.

Open Function Help

The description for a predefined function can be viewed by clicking Help in the right-click menu of a Function node.

Function Palette

The Function palette contains all the functions logically grouped into different categories:

Arithmetic Functions

Fiorano eMapper provides several Arithmetic functions to work with numbers and nodes. This section describes these functions.

Addition

Visual representation
Description: This function calculates and returns the sum of two nodes or numbers.
Input: Two number constants or input structure nodes.
Output: Number

Subtraction

Visual representation
Description: This function subtracts the values of two numbers or nodes.
Input: Two number constants or input structure nodes.
Output: Number

Division

Visual representation
Description: This function obtains and returns the quotient after dividing the values of two nodes or numbers.
Input: Two number constants or input structure nodes.
Output: Number

Modulo

Visual representation
Description: This function returns the remainder after dividing the values of the two nodes or numbers.
Input: Two number constants or input structure nodes.
Output: Number

Multiplication

Visual representation
Description: This function multiplies the values of two nodes or numbers.
Input: Two number constants or input structure nodes.
Output: Number

Floor

Visual representation
Description: This function rounds off the value of the node or number to the nearest lower integer.
Input: A number constant or an input structure node.
Output: Number
Example: The number 3.3 is floored to 3.

Ceiling

Visual representation
Description: This function rounds off the value of the node or number to the nearest higher integer.
Input: A number constant or an input structure node.
Output: Number
Example: The number 25.6 is ceiled to 26.

Round

Visual representation
Description: This function rounds off the value of the preceding node or a number to the nearest integer.
Input: A number constant or an input structure node.
Output: Number
Example: The number 4.8 is rounded off to 5 and 4.2 is rounded off to 4.

Number

Visual representation
Description: This function converts the input to a number according to the XPath specifications.
Input: A number constant or an input structure node.
Output: Number based on the following rules:

  • Boolean true is converted to 1, and false is converted to 0.
  • A node-set is first converted to a string and then converted in the same way as a string argument.
  • A string that consists of optional whitespace followed by an optional minus sign followed by a number followed by whitespace is converted to the IEEE 754 number that is nearest to the mathematical value represented by the string; any other string is converted to NaN.
  • An object of a type other than the four basic types is converted to a number in a way that is dependent on that type.

Math Functions

Absolute

Visual representation
Description: This function returns the absolute (non-negative) value of a number.
Input: Number
Output: The absolute value of the input

Sine

Visual representation
Description: This function returns the Sine value of the input. The input is in radians.
Input: A number in radians.
Output: The Sine value of the input.

Cosine

Visual representation
Description: This function returns the Cosine value of the input. The input is in radians.
Input: A number in radians
Output: The Cosine value of the input

Tangent

Visual representation
Description: This function returns the Tan value of the input. The input is in radians.
Input: A number in radians.
Output: The Tan value of the input.

Arc-sine

Visual representation
Description: This function returns the Arc Sine value or the Sine Inverse value of the input. The output is in radians.
Input: Number
Output: The Sine Inverse value of the input in radians.

Arc-cosine

Visual representation
Description: This function returns the Arc Cosine value or the Cosine Inverse value of the input. The output is in radians.
Input: Number
Output: The Cosine Inverse value of the input in radians.

Arc-tangent

Visual representation
Description: This function returns the Arc Tan value or the Tan Inverse value of the input. The output is in radians.
Input: Number
Output: The Tan Inverse value of the input in radians.

Random

Visual representation 
Description: This function returns a random number between 0 and 1.
Input: No input
Output: A number between 0 and 1.

Exponential

Visual representation
Description: This function returns the exponential value of the input.
Input: Any number
Output: The exponential value the input.

Power

Visual representation 
Description: This function returns the value of a first input raised to the power of a second number. 
Input: Two numbers: the first number is the base, and the second number is the power.
Output: A number that is the result of the above described calculation or NaN in case the value could not be calculated.

Sqrt

Visual representation
Description: This function returns the square root of the input value
Input: A number
Output: A number that is the square root of the input value.

Log

Visual representation
Description: This function returns the natural logarithm (base e) of a numerical (double) value.
Input: A positive numerical value.
Output: The natural logarithm (base e) of the input - a numerical (double) value.
Special cases:

  • If the argument is NaN or less than zero, the result is NaN.
  • If the argument is positive infinity, the result is positive infinity.
  • If the argument is positive zero or negative zero, the result is negative infinity.

String Functions

Fiorano eMapper has several string functions. All the functions accept Unicode strings and are case-sensitive. This section covers the string functions.

Concat

Visual representation

Description: This function accepts two or more string arguments and joins them in a specified sequence to a form a single concatenated string.
Input: Two or more string constants or input structure nodes.
Output: A concatenated string.
Example: Concat ("abc", "xyz") returns "abcxyz".

Length 

Visual representation
Description: This function returns the length of a string.
Input: A string constant or an input structure node.
Output: Number
Example: Length ("abcd") returns 4

Constant

Visual representation 
Description; This function creates a constant building block with a string literal.
Input: String
Output: String

XPath 

Visual representation 
Description: This function evaluates the specified XPath expression and returns the result.
Input: For elements within the first structure of the document, specify the XPath as:
/<root element>/<child element>
Example/school/student
For elements within the second structure onwards, specify the XPath as:
document('<structure name>')/<root element>/<child element>
Example: document('input2')/school/student
Output: Result of the XPath expression.

SubString-Before

Visual representation  
Description: 
This function accepts two strings as arguments. The first string is the source and the second is the string pattern. The function returns that part of the first input string that precedes the string pattern specified as the second argument to the function. 
Input:
Output: String 
Example: SubString-Before('abcde', 'cd') returns 'ab'

SubString-After

Visual representation
Description This function accepts two strings as arguments. The first string is the source and the second input string is the string pattern. It returns that part of the first input string that follows the string pattern.
Input: Two string constants or input structure nodes.
Output: String
Example: SubString-After('abcde','bc') returns "de"

SubString-Offset

Visual representation
Description: This function accepts two string constants as argument. The first string is the source and the second string is a numerical value that specifies the offset. The output is that part of the source string which starts from the offset specified as the second argument to the function.
Input: Two string constants or input structure nodes.
Output: String
Example: SubString-Offset('abcde', 3) returns "cde"

SubString-Offset-Length

Visual representation
Description: This function accepts three arguments. The first argument is the source string, the second and third arguments are numerical that specify the offset and the size of the output substring respectively. The output is a substring which starts from the offset specified as the second argument to the function. The number of characters that need to be obtained is specified as the third argument.
Input: Two string constants or input structure nodes and a number.
Output: String
Example: SubString-Offset-Length('abcde', 2, 3) returns "bcd"

Normalize_Space

Visual representation 
Description: This function accepts a string as an argument and removes leading, trailing, and enclosed spaces in the specified string. The unnecessary white spaces within the string are replaced by a single white space character. 
Input: A string or an input structure node.
Output: String with no whitespace before, after, or within it. 
Example: Normalize_Space(" eMapperTool ") returns "eMapper Tool".
White spaces before and after the string is removed and the white spaces between "eMapper" and "Tool" are replaced by a single blank space.

Translate 

Visual representation 

Description: This function accepts three string constants as arguments. The first argument is the source string, the second is the string of characters that needs to be replaced and the third argument is the string of characters that replaces the ones in the second argument. The Translate function replaces the first occurrences of characters specified in the second argument, at corresponding positions with characters specified in the third argument. 

This function returns the first argument string after replacing the characters specified in the second argument. If a character occurs more than once in the second argument string, only the first occurrence of that character is replaced. If the third argument string is longer than the second argument string, then the excess characters are ignored.

Input: Three string arguments or input structure nodes.

Output: A string

Example: 

  • Translate('goose', 'egos','EGOS') returns goose
  • Translate('goose', 'se','d') returns good
  • Translate('goose', 'gseo','bad') returns bad
  • Translate('goose', 'gseg','bksC') returns books
Uppercase 

Visual representation 

Description: This function accepts a string and converts all the characters in the string or input node to upper case.
Input: A string argument or input structure node.
Output: A string converted to upper case.
Example: UpperCase ("abcde") returns > "ABCDE"

Lowercase

Visual representation 

Description This function accepts a string and converts all the characters in the string or input node to lower case.
Input A string argument or input structure node
Output A string converted to lower case
Example LowerCase ("ABCDE") returns "abcde"

Togglecase

Visual representation 

Description: This function toggles the case of the characters in the input string or node. All upper case characters are converted to lower case, and lower case characters are converted to upper case.
Input: A string argument or input structure node
Output: A string with the case of its alphabets toggled
Example: ToggleCase("aBcDe") returns "AbCdE"

Contains

Visual representation 

Description: This function accepts two strings as arguments and checks if the second string is a substring of the first. If the second string is a substring of the first, the function returns TRUE.
Input: Two string arguments or input structure nodes
Output: A Boolean value (TRUE / FALSE)
Example: Contains("TifosiMapper", "Mapper") returns TRUE

StartsWith

Visual representation 

Description: This function accepts two strings as arguments and checks if the first string starts with the second input string. If the first string argument starts with the second string, the function returns TRUE.
Input: Two string arguments or input structure nodes.
Output: A Boolean value (TRUE / FALSE)
Example: StartsWith("TifosiMapper", "Tif") returns TRUE

StartsWith-Number

Visual representation 

Description: This function accepts a string as an argument and checks if the string starts with a number.
Input: A string argument
Output: A Boolean value (TRUE / FALSE)
Example: StartsWith-Number ("2003Tifosi") returns TRUE

Control Function

The following Control functions are available in Fiorano eMapper:

If-Then-Else

Visual representation
Description: This function accepts an input value. The first input is a Boolean value and the second and third are string constants. Based on the Boolean value, the function returns the output. If the Boolean value specified in the first input is TRUE, then the function returns the second input string else it returns the third input string.
Input: Boolean value and a string, an optional string in the same sequence.
Output: The second input string or third input string (if present) depending on the first input Boolean value.

Sort

Visual representation
Description: This function accepts two inputs. The first input is a set of nodes and the second input is the value of the nodes. The function sorts the nodes in its first input based on the second input.
Input: Sort (nodes, value)
Output: Sorted nodes as Loop Source

Filter

Visual representation
Description: This function accepts two arguments. The first argument is a set of nodes and the second argument is a Boolean value. It filters out and returns the nodes for which the second input value is TRUE.
Input: Filter (node set, bool)
Output: Nodes for which the second input value is true as Loop Source.

Conversion Functions

Fiorano eMapper consists of several Conversion functions to convert numerical from one format to the other. These functions are covered in this section.

ChangeBase

Visual representation 
Description: The ChangeBase function is used to change a number from one base to another. This function accepts three arguments.

  • num- the number to be changed
  • fromBase- base of the given number
  • toBase- base to which number should be converted

Input: Number
Output: Number

Hex

Visual representation 
Description: Converts a decimal number to a hexadecimal (base 16) number.
Input: Decimal number
Output: Hexadecimal (base 16) number

Octal

Visual representation 
Description: Converts a decimal number to an octal (base 8) number.
Input: Decimal number
Output: Octal (base 8) number

Binary

Visual representation 
Description: Converts a decimal number to a binary (base 2) number.
Input: Decimal number
Output: Binary (base 2) number

Decimal

Visual representation
Description: Converts the first input value having a base that is specified by the second input value to a decimal number.
Input: Two numbers: The first input value is the number to be converted to decimal, and the second input value specifies the base of the first input value.
Output: Number in base 10.

Degrees

Visual representation 
Description: Converts a value in Radians to a value in Degrees. 
Input: Number 
Output: Number

Radians

Visual representation
Description: Converts a value in Degrees to a value in Radians.
Input: Number
Output: Number

Advanced Functions

Fiorano eMapper provides a number of advanced functions. This section explains all these functions.

CDATA Function

Visual representation
Description: This function accepts a string as an argument and specifies the character data within the string.
Input: String argument or input structure node.
Output: Input string or node text enclosed within the CDATA tag.
Example: CDATA ("string") returns <![CDATA[ string]]>

Deep-Copy 

Visual representation 
Description: Copies the current node completely including the attributes and sub-elements. 
Input: An Input structure node
Output: All the contents of the Input structure node – including its attributes and sub-elements.

Position

Visual representation
Description: This function is available for the RDBMS-Update or RDBMS-Delete Output structures only and returns the current looping position.
Input: None
Output: The position of the element in the parent tree.
Example: In an XML tree that has three elements, Position() returns

  • 0 for the first element
  • 1 for the second, and
  • 2 for the third.
Node-Name

Visual representation 
Description: This function accepts an element or attribute and returns the name of the particular element or attribute.
Input: A single element or attribute of any type
Output: A string

Count

Visual representation 
Description: This function accepts an element or attribute and returns the number of instances of a particular element or attribute.
Input: A single element or attribute of any type
Output: A number

Format-Number

Visual representation
Description: This function converts the first argument to a string, in the format specified by the second argument. The first argument can be a real number or an integer, and can be positive or negative.
Input: Two values: The first input is a number, and the second, a string of special characters that specifies the format. These special characters are listed in the following table:

Representation

Signifies

Example

 

a digit [0-9]

###

.

the decimal point

###.##

,

digit separator

###, ###.##

0

leading and trailing zeros

000.0000

%

inserts a percentage sign at the end

###.00%

;

a pattern separator

##.00;##.00

The format string is created by using these characters in any order.
Output: String with the number in the specified format.

Param

Visual representation
Description: This function is used to access the runtime parameters by its name. Various properties of Tifosi Document (such as header, message, and attachments) are available as runtime parameters at runtime. The names of these parameters follow the convention given below:

Header Properties

TIF_HEADER<HEADERNAME>

Message (text)

TIF_BODY_TEXT

Message (byte)

TIF_BODY_BYTE

Attachment

TIF_ATTACH<NAME>

Input: Name of the parameter
Output: Value of the parameter specified

Variable

Visual Representation 

Description: This function selects the value of an XML element and sends it to the output. The name of the XML element whose value is to be selected can be provided by double-clicking on the node.
Input:  The function does not take any input.
Output: The value of the XML element specified in the funclet preferences.
Example: The function could be used in a case where the complete input schema could not be loaded in the mapper. Providing the XPath of an element from input schema to this function will give a result identical to the one obtained by mapping the input element to an output node

Base64 Encode

Visual Representation 

Description: This function accepts a byte-array data as input and encodes it into a String
Input: A byte-array of data to be encoded.
Output: The String output.

Icon

The function uses a Java extension and hence needs the FIORANO_HOME/extlib/base64/base64-2.1.jar in its classpath.

Base64 Decode

Visual Representation 

Description: This function accepts a string as an argument, decodes it, and returns a byte-array.
Input: One string argument or input structure node to encode.
Output: Bas64-decoded byte-array

Icon

The function uses a Java extension and hence needs the FIORANO_HOME/extlib/base64/base64-2.1.jar in its classpath.

Base64 Encode-from-String

Visual Representation 

Description: This function accepts a string data as input and encodes it into a string
Output: The String output.

Icon

The system default encoding is used to convert the input string to bytes before encoding.

Base64 Decode-to-String

Visual Representation 

Description: This function accepts a string data as input and decodes it into a string
Output: The String output.

Icon

The system default encoding is used to convert encoded bytes to output string.

UUID 

Visual Representation 

Description: This function generates a random UUID (Universally Unique Identifier). The generated UUID is random, true to the standards and is generated using the java.util.UUID.randomUUID() function
Input: This function does not take any input
Output: A random UUID

getIncrementalID

Visual Representation 

Description: This function adds the count with which the ID is to be increased and gives the resultant ID after addition. This can be set to a message using the setStringProperty funclet.
Input: File path, prefix, initial value, count to be increased and suffix as String arguments.
Output: The resultant ID after increasing the count.

Date-Time Functions

Date

Visual representation
Description: The Date function returns the date part in the input date-time string or the current date if no input is given. The date returned format is: CCYY-MM-DD
If no argument is given or the argument date/time specifies a time zone, then the date string format must include a time zone, either a Z to indicate Coordinated Universal Time or a + or - followed by the difference between the difference from UTC represented as hh:mm. If an argument is specified and it does not specify a time zone, then the date string format must not include a time zone.
Input: Optionally, a string that can be converted to a date (the string should have the date specified in the following format: CCYY-MM-DD)
Output: A date in the format: CCYY-MM-DD

DateTime

Visual representation
Description: This function returns the current date and time as a date/time string in the following format:
CCYY-MM-DDThh:mm:ss
Where,

  • CC is the century
  • YY is the year of the century
  • MM is the month in two digits
  • DD is the day of the month in two digits
  • T is the separator between the Date and Time part of the string
  • hh is the hour of the day in 24-hour format
  • mm is the minutes of the hour
  • ss is the seconds of the minute

The output format includes a time zone, either a Z to indicate Coordinated Universal Time or a + or - followed by the difference between the localtime from UTC represented as hh:mm.
Input: This function has no input.
Output: The current date-time in the following format: CCYY-MM-DDThh:mm:ss as described above.

DayAbbreviation

Visual representation
Description: This function returns the abbreviated day of the week from the input date string. If no argument is given, then the current local date/time is used as the default argument.
Input: Optionally, a date-time string
Output: The English day of the week as a three-letter abbreviation: 'Sun', 'Mon', "Tue', 'Wed', 'Thu', 'Fri', or 'Sat'.

DayInMonth

Visual representation
Description: This function returns the day of a date as a number. If no argument is given, then the current local date/time is used as the default argument.
Input: A date-time string in any of the following formats:
CCYY-MM-DDThh:mm:ss
CCYY-MM-DD
--MM-DD
---DD
If no input is given, then the current local date/time is used.
Output: A number which is the day of the month in the input string.

DayInWeek

Visual representation
Description: This function returns the day of the week given in a date as a number. If no argument is given, then the current local date/time is used the default argument.
Input: A date string in any of the following formats:
CCYY-MM-DDThh:mm:ss
CCYY-MM-DD
Output: The day of the week as a number - starting with 1 for Sunday, 2 for Monday and so on up to 7 for Saturday. If the date/time input string is not in a valid format, then NaN is returned.

DayInYear

Visual representation
Description: This function returns the day of a date as a day number in a year starting from 1.
If no argument is given, then the current local date/time, as returned by date-time is used as the default argument.
Input: Optionally, a date string in any of the following formats:
CCYY-MM-DDThh:mm:ss
CCYY-MM-DD
Output: A number representing the day in a year.
Example: The DayInYear for 2003-01-01 returns 1, where as for 2003-02-01 it returns 32.

DayName

Visual representation
Description: This function returns the full day of the week for a date. If no argument is given, then the current local date/time is used the default argument.
Input: Optionally, a date string in any of the following formats:
CCYY-MM-DDThh:mm:ss
CCYY-MM-DD
Output: An English day name: 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday' or 'Friday'.

DayOfWeekInMonth

Visual representation
Description: This function returns the occurrence of that day of the week in a month for a given date as a number. If no argument is given, then the current local date/time is used as the default argument.
Input: Optionally, a date string in any of the following formats:
CCYY-MM-DDThh:mm:ss
CCYY-MM-DD
Output: A number that represents the occurrence of that day-of-the-week in a month.
Example: DayOfWeekInMonth returns 3 for the 3rd Tuesday in May.

HourInDay

Visual representation
Description: This function returns the hour of the day as a number. If no argument is given, then the current local date/time is used as the default argument.
Input: A date string in any one of the following formats:
CCYY-MM-DDThh:mm:ss
hh:mm:ss
If the date/time string is not in one of these formats, then NaN is returned.
Output: The hour of the day or NaN if the argument is not valid.

LeapYear

Visual representation
Description: This function returns TRUE if the year given in a date is a leap year. If no argument is given, then the current local date/time is used as the default argument.
Input: Date string in any of the following formats:
CCYY-MM-DDThh:mm:ss
CCYY-MM-DD
CCYY-MM
CCYY
If the date/time string is not in one of these formats, then NaN is returned.
Output: Boolean value (TRUE/FALSE)

MinuteInHour

Visual representation
Description: This function returns the minute of the hour as a number. If no argument is given, then the current local date/time is used as the default argument.
Input: Optionally, a date string in any of the following formats:
CCYY-MM-DDThh:mm:ss
hh:mm:ss
Output: The minute of the hour or NaN if the argument is not valid.

MonthAbbreviation

Visual representation
Description: This function returns the abbreviation of the month of a date. If no argument is given, then the current local date/time is used as the default argument.
Input: Date string in any of the following formats:
CCYY-MM-DDThh:mm:ss
CCYY-MM-DD
CCYY-MM
-MM-
OutputThree-letter English month abbreviation: 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov' or 'Dec'.If the date/time string argument is not in valid, then an empty string ('') is returned.

MonthInYear

Visual representation

Description: This function returns the month of a date as a number. The counting of the month starts from 0. If no argument is given, the current local date/time is used as the default argument.
Input: Date string in any of the following formats:
CCYY-MM-DDThh:mm:ss
CCYY-MM-DD
CCYY-MM
-MM-
--MM-DD
If the date/time string is not valid, then NaN is returned.
Output: A number representing the month in a year.
Example: 0 for January, 1 for February, 2 for March and so on.

MonthName

Visual representation
Description: This function returns the full name of the month of a date. If no argument is given, then the current local date/time is used as the default argument.
Input: Optionally, a date string in any of the following formats:
CCYY-MM-DDThh:mm:ss
CCYY-MM-DD
CCYY-MM
-MM-
Output: The English month name: 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November' or 'December'.If the date/time string is not valid, then an empty string ('') is returned.

SecondInMinute

Visual representation
Description: This function returns the second of the minute as a number. If no argument is given, then the current local date/time is used as the default argument.
Input: Optionally, a date string in any of the following formats:
CCYY-MM-DDThh:mm:ss
hh:mm:ss
Output: The second in a minute as a number. If the date/time string is not valid, then NaN is returned.

Time

Visual representation
Description: This function returns the time specified in the date/time string that is passed as an argument. If no argument is given, the current local date/time is used as the default argument. The date/time format is basically CCYY-MM-DDThh:mm:ss.
If no argument is given or the argument date/time specifies a time zone, then the time string format must include a time zone, either a Z to indicate Coordinated Universal Time or a + or - followed by the difference between the difference from UTC represented as hh:mm. If an argument is specified and it does not specify a time zone, then the time string format must not include a time zone.
Input: Optionally, a date/time string in the following format:
CCYY-MM-DDThh:mm:ss
Output: The time from the given date/time string in the following format:
hh:mm:ss
If the argument string is not in this format, this function returns an empty string ('').

WeekInYear

Visual representation 
Description: This function returns the week of the year as a number. If no argument is given, then the current local date/time is used as the default argument. Counting follows ISO 8601 standards for numbering: week 1 in a year is the week containing the first Thursday of the year, with new weeks beginning on a Monday.
Input: Optionally, a date/time string in any of the following formats:

  • CCYY-MM-DDThh:mm:ss
  • CCYY-MM-DD

 

Output: The week of the year as a number. If the date/time string is not in one of these formats, then NaN is returned.

Year

Visual representation 
Description: This function returns the year of a date as a number. If no argument is given, then the current local date/time is used as a default argument.
Input: Optionally, a date/time string in any of the following formats:

  • CCYY-MM-DDThh:mm:ss
  • CCYY-MM-DD
  • CCYY-MM
  • CCYY

Output: If the date/time string is not in one of these formats, then NaN is returned.

dateConversion:ConvertDate

Visual Representation 

Description Converts the date from one format to the other. For example, date can be converted from MM-dd-yyyy to dd-MM–yy

function convertDate(dateString, inFormat, outFormat)

Input Accepts three arguments. The first argument is the date passed as a string to the function. The second argument is the input format and the third argument is the required output format for the date.
Output The date string

The input and output format strings can contain the following abbreviations.

Field Full FormShort Form
Yearyyyy (4 digits)yy (2 digits), y (2 or 4 digits)
MonthMMM (name or abbr.)MM (2 digits), M (1 or 2 digits)
 NNN (abbr.)

 

Day of Monthdd (2 digits)d (1 or 2 digits)
Day of WeekEE (name)E (abbr)
Hour (1-12)hh (2 digits)h (1 or 2 digits)
Hour (0-23)HH (2 digits)H (1 or 2 digits)
Hour (0-11)KK (2 digits)K (1 or 2 digits)
Hour (1-24)kk (2 digits)k (1 or 2 digits)
Minutemm (2 digits)m (1 or 2 digits)
Secondss (2 digits)s (1 or 2 digits)
AM/PMa 

Each format token matching one of the formats mentioned in the table will be replaced with the appropriate value. Any other characters in the format string will remain in the resulting date string unaltered.

Icon
  • The conversion fails if the input date string does not match the input format
  • The convertDate function does not support milliseconds and time-zone offsets. If the input string has any unsupported items, they have to be stripped off using string operations before mapping to the convertDate function

Examples

  1. "MMM d, y" matches: January 01, 2000, Dec 1, 1900, Nov 20, 00
  2. "M/d/yy" matches: 01/20/00, 9/2/00
  3. "MMM dd, yyyy hh:mm:ssa" matches: "January 01, 2000 12:30:45AM"
  4. "yyyy-MM-ddTHH:mm:ss" matches the XML format DateTime "2002-05-30T09:00:00" and
  5. "yyyy-MM-ddThh:mm:ssZ" matches the XML format DateTime in UTC time "2002-05-30T09:00:00Z" 
ConvertDateV2

Description: Converts the date from one format to the other. For example, date can be converted from MM-dd-yyyy to dd-MM-yy

function convertDate(dateString, inFormat, outFormat)

Input: Accepts three arguments. The first argument is the date passed as a string to the function. The second argument is the input format and the third argument is the required output format for the date.

Output: The converted date string

Icon
  • The conversion sends empty output if the input date string does not match the input format 
  • The conversion is based on Simple Date Format conventions. Refer here for various symbols to be used for formatting

Examples

Icon

yyyy-MM-dd'T'HH:mm:ssX matches: 2015-10-01T16:19:24+03:00, the output format of datetime funclet. 
yyyy-MM-dd'T'HH:mm:ssZ matches: 2015-10-01T17:15:07+0530

ConvertDateV2Advanced

Description: Converts the date from one format to the other. For example, date can be converted from MM-dd-yyyy to dd-MM-yy

function convertDate(dateString, inFormat, outFormat,mismatchAction)

Input: Accepts four arguments. The first argument is the date passed as a string to the function. The second argument is the input format and the third argument is the required output format for the date.

The fourth argument Mismatch Action can have one of the following inputs (case insensitive) as string constant, this action will be taken if the input is empty or does not match the input format specified

  • MapEmpty - Maps empty value to output node
  • MapInput - Copies input value to output without conversion
  • ThrowError - Halts processing and throws error

Output: The converted date string

Icon

The conversion is based on Simple Date Format conventions. Refer here for various symbols to be used for formatting 

Examples

Icon

yyyy-MM-dd'T'HH:mm:ssX matches: 2015-10-01T16:19:24+03:00, the output format of datetime funclet. 
yyyy-MM-dd'T'HH:mm:ssZ matches: 2015-10-01T17:15:07+0530

addDate

Description: Adds the specified days/hours/minutes/seconds to the date and gives the resultant date in the specified input format. For example, no. of days will be added to the date in the format dd-MM-yyyy HH:mm:ss

function addDate(dateString, inputFormat, days, hours, minutes, seconds)

Input: Accepts six arguments. The first argument is the date passed as a string to the function. The second argument is the input format of the date. The third, fourth, fifth, sixth arguments are the number of days, hours, minutes, seconds that are to be added to the given date. The constant 0 has to be passed if either of the arguments are to be avoided

Output: The resultant date after adding the parameters

Icon
  • The function sends empty output if the input date string does not match the input format 
  • The input format is based on Simple Date Format conventions. Refer here for various symbols to be used for formatting
subtractDate

Description: Subtracts the specified days/hours/minutes/seconds to the date and gives the resultant date in the specified input format. For example, no. of days will be subtracted from the date in the format dd-MM-yyyy HH:mm:ss

function subtractDate(dateString, inputFormat, days, hours, minutes, seconds)

Input: Accepts six arguments. The first argument is the date passed as a string to the function. The second argument is the input format of the date. The third, fourth, fifth, sixth arguments are the number of days, hours, minutes, seconds that are to be subtracted from the given date. The constant 0 has to be passed, if either of the arguments are to be avoided

Output: The resultant date after subtracting the parameters

Icon
  • The function sends empty output if the input date string does not match the input format 
  • The input format is based on Simple Date Format conventions. Refer here for various symbols to be used for formatting
dateDiff

Description: Gives the resultant number of days lapsed between the two dates, whose input format has to be specified. For example, the difference between the 2 dates in the format dd-MM-yyyy HH:mm:ss will be the number of days.

function dateDiff(dateString1, dateString2, inputFormat)

Input: Accepts three arguments. The first two arguments are the two dates. The third argument is the input format for the date string

Output: The resultant no of days after calculating the difference between the parameters

Icon
  • The function sends empty output if the input date string does not match the input format 
  • The inputFormat is based on Simple Date Format conventions. Refer here for various symbols to be used for formatting

NodeSet Functions

Sum 

Visual representation
Description: The Sum function sums all numbers in selected nodes.
Input: A nodes that has numerical values only.
Output: The sum of all the nodes. If any of the input nodes is not valid, a NaN value is returned.

Difference

Visual representation
Description: The difference function returns the difference between the two node sets that are, in the node set passed as the first argument and the node that are not in the node set passed as the second argument.
Input: Two node sets
Output: Node set

Distinct

Visual representation
Description: The distinct function returns a subset of the nodes contained in the node-set passed as the first argument. Specifically, it selects a node N if there is no node in a given node-set that has the same string value as N, and that precedes N in the document order.
Input: A node set
Output: A node

Has Same Node

Visual representation
Description: The has-same-node function returns TRUE if the node set passed as the first argument shares any nodes with the node set passed as the second argument. If there are no nodes that are in both node sets, then it returns FALSE.
Input: Two node sets
Output: Boolean value (TRUE or FALSE)

Iintersection

Visual representation
Description The intersection function returns a node set containing the nodes that are within both the node sets passed as arguments to it.
Input: Two node sets
Output: Node set

Leading

Visual representation
Description: The leading function returns the nodes in the node set passed as the first argument that precede, in document order, the first node in the node set passed as the second argument. If the first node in the second node set is not contained in the first node set, then an empty node set is returned. If the second node set is empty, then the first node set is returned.
Input: Two node sets
Output: Node Set

Trailing

Visual representation
Description: The trailing function returns the nodes in the node set passed as the first argument that follow, in document order, the first node in the node set passed as the second argument. If the first node in the second node set is not contained in the first node set, then an empty node set is returned. If the second node set is empty, then the first node set is returned.
Input: Two node sets
Output: Node set

Highest

Visual representation
Description: The highest function returns the nodes in the node set whose value is the maximum (numerical) value for the node set.

  • A node has this maximum value if the result of converting its string value to a number as if by the number function is equal to the maximum value, where the equality comparison is defined as a numerical comparison using the = operator.
  • If any of the nodes in the node set has a non-numeric value, this function returns an empty node set.

Input: A node set
Output: A node set

Lowest

Visual representation
Description: The lowest function returns the nodes in the node set whose value is the minimum (numerical) value for the node set.

  • A node has this minimum value if the result of converting its string value to a number as if by the number function is equal to the minimum value, where the equality comparison is defined as a numerical comparison using the = operator.
  • If any of the nodes in the node set has a non-numeric value, this function returns an empty node set.

Input: A node set
Output: A node set

Minimum

Visual representation
Description: The minimum function returns the node with the minimum numerical value within the given node-set. If the node set is empty, or if any of the nodes in the node set has a non-numeric value, then NaN is returned.
Input: A node set
Output: A numerical value

Maximum

Visual representation
Description: The maximum function returns the node with the maximum numerical value within the given node set. If the node set is empty, or if any of the nodes in the node set has a non-numeric value, then NaN is returned.
Input: A node set
Output: A numerical value

Boolean Functions

The following boolean (logical) functions are available in eMapper Tool:

Symbol

Function

Description

=

Equal

True if both inputs are equal.

!=

Not Equal

True if both inputs are not equal

>

Greater than

True if the first input is greater than the second input.

<

Less than

True if the first input is less than the second input.

>=

Greater than or Equal

True if the first input is greater than or equal to the second input.

<=

Less than or Equal

True if the first input is less than or equal to the second input.

AND

AND

Logical AND of the two inputs (the inputs must be outputs of logical building blocks only).

OR

OR

Logical OR of the two inputs (the inputs must be outputs of logical building blocks only).

NOT

NOT

Logical inverse of the input (the input must be the output of logical building block only).

BOOL

boolean(object)

Converts its argument to a boolean according to the XPath specifications, as follows:

  • a number is true if and only if it is neither positive or negative zero nor NaN.
  • a node-set is true if and only if it is non-empty
  • a string is true if and only if its length is non-zero an object of a type other than the four basic types is converted to a boolean in a way that is dependent on that type.
  • ? IsNumber-IsNumber( )-Returns a boolean (true/ false) indicating if the input value is a number
Equal 

Visual representation 

Symbol: = 
Description: This function returns TRUE if both the inputs are equal.

Input: = (Object = Object) 
Output: Boolean value (TRUE/FALSE)

Example:
Consider the example of Chat.dtd as Input Structure and Valid.dtd as Output Structure. Suppose we want to filter mails coming from a particular email address. That is, we want that the isFromAdmin node of the Output Structure takes the value true if the Email node of the Input Structure has the email address as admin@nobody.com. Then,

  1. Load InputStructure and OutputStructure.
  2. Map the Email node of Input Structure to the isFromAdmin node of the Output Structure.
  3. Invoke the Function Wizard by right-clicking on the isFromAdmin node.
  4. The Function Easel opens with the existing mappings.
  5. Now place a Constant building block on the Function Easel and set its value equal to admin@nobody.com.


    Figure 15: Setting Constant building block value to admin@nobody.com

  6. Now place a = node on the Function Easel.
  7. Link the outputs of the Email node and Constant node to the inputs of the = node.
  8. Link the output of the = node to the input of the isFromAdmin node.


    Figure 16: Linking = andisFromAdminnode
     
  9. This completes the desired mappings.
Not Equal 

Visual representation 

Symbol ! = 
Description: This function returns TRUE if both the inputs are not equal.
Input != (Object = Object)
Output: Boolean value (TRUE/FALSE)

Example:
Consider the example of Chat.dtd as Input Structure and Valid.dtd as Output Structure. Suppose we want to filter out mails that do not have a message body. That is, we want that the isMessageExist node of the Output Structure takes the value true if the length of the Message node of the Input Structure is not equal to zero. Then,

  1. Load InputStructure and OutputStructure.
  2. Map the Message node of Input Structure to the isMessageExist node of the Output Structure.
  3. Invoke the Function Wizard by Right-clicking on the isMessageExist node.
  4. The Function Easel opens with the existing mappings.
  5. Now place a Constant building block on the Function Easel and set its value equal to 0.
  6. Place a Length node on the Function Easel.
  7. Link the output of the Message node to the input of the Length node.


    Figure 17: Linking the Message and Length nodes
     
  8. Place a != node on the Function Easel.
  9. Link the outputs of the Length node and Constant node to the inputs of the != node.
  10. Also, link the output of the != node to the input of the isMessageExist node.


    Figure 18: Linking the!=and isMessageExist nodes

  11. This completes the desired mappings.
Greater than 

Visual Representation 

Symbol: >
Description: This function returns TRUE if the first input is greater than the second input value.

Input: > (Number > Number)
Output: Boolean value (TRUE/FALSE)

Example:
Consider the example of TotalMarks.dtd as Input Structure and Result.dtd as Output Structure. Suppose we want that the value of the PassStatus node is true if the value of the TotalMarks node of the Input Structure is greater than a constant value 150. Then,

  1. Load InputStructure and OutputStructure.
  2. Map the TotalMarks node of Input Structure to the PassStatus node of the Output Structure.
  3. Invoke the Function Wizard by right-clicking on the PassStatus node.
  4. The Function Easel opens with the existing mappings.
  5. Now place a Constant building block on the Function Easel and set its value equal to 150.


    Figure 19: Setting the Constant building block to 150
     
  6. Place a > node on the Function Easel.
  7. Link the outputs of TotalMarks node and Constant node to the input of the > node.
  8. Also, link the output of the > node to the input of the PassStatus node.


    Figure 20: Linking the > and PassStatus node
     
  9. This completes the desired mappings.
Less Than 

Visual Representation 
Symbol: < 
Description: This function returns TRUE if the first input is less than the second input value.

Input: < (Number < Number)
Output: Boolean value (TRUE/FALSE)

Example:
Consider the example of Numbers.dtd as Input Structure and Results.dtd as Output Structure. Suppose we want that Result node of Output Structure should have the value true if the value of Number1 node is less than the value of the Number2 node of the Input Structure. Then,

  1. Load InputStructure and OutputStructure.
  2. Map the Number1 and Number2 nodes of Input Structure to the Result node of the Output Structure.
  3. Invoke the Function Wizard by right-clicking on the Result node.
  4. The Function Easel shows the existing mappings.
  5. Place the < node on the Function Easel.


    Figure 21: Placing a node on the Function Easel
     
  6. Link the outputs of the Number1 node and Number2 node to the inputs of the < node.
  7. Also, link the output of the < node to the input of the Result node.


    Figure 22: Linking < and Result node
     
  8. This completes the desired mappings.
Greater than or Equal

Visual Representation 

Symbol: >= 
Input: >= (Number >= Number)
Description: True if the first input is greater than or equal to the second input. Output: True/False

Example:
Consider the example of TotalMarks.dtd as Input Structure and Result.dtd as Output Structure. Suppose we want that the value of the PassStatus node as true if the value of the TotalMarks node of the Input Structure is greater than or equal to a constant value 150. Then,

  1. Load InputStructure and OutputStructure.
  2. Map the TotalMarks node of Input Structure to the PassStatus node of the Output Structure.
  3. Invoke the Function Wizard by right-clicking on the PassStatus node.
  4. The Function Easel opens with the existing mappings.
  5. Now place a Constant building block on the Function Easel and set its value equal to 150.


    Figure 23: Setting the Constant building block to 150
     
  6. Place a >= node on the Function Easel.
  7. Link the outputs of TotalMarks node and Constant node to the input of the >= node.
  8. Also, link the output of the >= node to the input of the PassStatus node.


    Figure 24: Linking the >= and PassStatus nodes
     
  9. This completes the desired mappings.
Less Than or Equal 

Visual Representation 
Symbol: <=
Description: This function returns TRUE if the first input is less than or equal to the second input.

Input: <= (Number <= Number)
Output: Boolean value (TRUE/FALSE)

Example:
Consider the example of Numbers.dtd as Input Structure and Results.dtd as Output Structure. Suppose we want that the Result node of Output Structure to have the value true if the value of Number1 node is less than or equal to the value of the Number2 node of the Input Structure. Then,

  1. Load InputStructure and OutputStructure.
  2. Map the Number1 and Number2 nodes of Input Structure to the Result node of the Output Structure.
  3. Invoke the Function Wizard by right-clicking on the Result node.
  4. The Function Easel shows the existing mappings.
  5. Place the <= node on the Function Easel.


    Figure 25: Placing <= node on the Function Easel
     
  6. Link the outputs of the Number1 node and Number2 node to the inputs of the <= node.
  7. Also, link the output of the <= node to the input of the Result node.


    Figure 26: Linking outputs of theNumber1andNumber2nodes
     
  8. This completes the desired mappings.
OR

Visual Representation 
Symbol: OR
Description: This function accepts two boolean expressions as arguments and performs logical disjunction on them. If either expression evaluates to TRUE, the function returns TRUE. If neither expression evaluates to True, the function returns FALSE.

Input: OR ( boolean OR boolean )
Output: Boolean value (TRUE/FALSE)

Example:
Consider the example of Chat.dtd as Input Structure and Valid.dtdas Output Structure. Suppose we want to receive mails that are sent either from the address admin@nobody.com or aryton@nobody.com that is, we want that the isValid node of the Output Structure takes the value true if the Email node of the Input Structure has the value admin@nobody.com or aryton@nobody.com. Then,

  1. Load Input Structure and Output Structure.
  2. Map the Email node of Input Structure to the isValid node of the Output Structure.
  3. Invoke the Function Wizard by right-clicking on the isValid node.
  4. The Function Easel opens with the existing mappings.
  5. Place a Constant node on the Function Easel and set its value equal to admin@nobody.com.
  6. Place another Constant node and set its value equal to aryton@nobody.com.


    Figure 27: Setting the Constant node value to aryton@nobody.com

  7. Now place two = nodes on the Function Easel, and make links.


    Figure 28: Placing two = nodes on the Function Easel
     
  8. Place a OR node on the Function Easel.
  9. Link the outputs of the two = nodes to the inputs of the OR node.
  10. Also, link the output of the OR node to the input of the isValid node.


    Figure 29: Linking the OR and isValid nodes
     
  11. This completes the desired mappings.
AND

Visual representation: 

Symbol AND
Description: This function accepts two boolean expressions as arguments and performs a logical conjunction on them. If both expressions evaluate to TRUE, the function returns TRUE. If either or both expressions evaluate to FALSE, the function returns FALSE.

Input: AND (boolean AND boolean)
Output: Boolean value (TRUE/FALSE)

Example:
Consider the example of Chat.dtd as Input Structure and Valid.dtd as Output Structure. Suppose we want to filter out mails that do not have a message body and the email address is not equal to admin@nobody.com. That is, we want that the isValid node of the Output Structure takes the value true if the length of the Message node of the Input Structure is not equal to zero and the value of the Email node is equal to admin@nobody.com. Therefore,

  • Load Input Structure and Output Structure.
  • Map the Message node and Email node of Input Structure to the isValid node of the Output Structure.
  • Invoke the Function Wizard by Right-clicking on the isValid node.
  • The Function Easel opens with the existing mappings.
  • Place the BOOL node on the Function Easel.
  1. Link the output of the Message node to the input of the BOOL node.


    Figure 30: Linking Message and BOOL nodes
     
  2. Place a Constant node on the Function Easel, and set its value equal to admin@nobody.com.
  3. Place a = node on the Function Easel.
  4. Link the outputs of the Email node and Constant node to the inputs of the = node.


    Figure 31: Linking the Email and Constant node outputs
     
  5. Place an AND node on the Function Easel.
  6. Link the outputs of the BOOL node and = node to the inputs of the AND node.
  7. Also, link the output of the AND node to the input of the isValid node.


    Figure 32: Linking the AND and = node outputs
     
  8. This completes the desired mappings.
NOT 

Visual representation 

Symbol: NOT
Description: This function accepts a boolean expression as the argument and performs logical negation the expression. The result is a boolean value representing whether the expression is FALSE. That is, if the expression is FALSE, the result of this function is TRUE.

Input: NOT (boolean)
Output: Boolean value (TRUE/FALSE)

Example:
Consider the example of Valid.dtd as Input and Output Structure. Suppose we want to make mails from email address admin@nobody.com as invalid. That is, we want that if the value of isFromAdmin node is true, then the value of isValid is set to false. Then,

  1. Load Input Structure and Output Structure.
  2. Map the isFromAdmin node of Input Structure to the isValid node of the Output Structure.
  3. Invoke the Function Wizard by right-clicking on the isValid node.
  4. The Function Easel shows the existing mappings.
  5. Now place a NOT node on the Function Easel.


    Figure 33: placing a NOT node on the Function Easel
     
  6. Link the output of the isFromAdmin node to the input of the NOT node.
  7. Also link the output of the NOT node to the input of the isValid node.


    Figure 34: Linking theNOT and isValid nodes
     
  8. This completes the desired mappings.
BOOL

Visual representation 
Symbol: BOOL
Description: This function converts its argument to a boolean according to the XPath specifications which are as follows:

  • A number is TRUE if and only if it is neither positive or negative zero nor NaN.
  • A node-set is TRUE if and only if it is non-empty.
  • A string is TRUE if and only if its length is non-zero.

An object of a type other than the four basic types is converted to a boolean in a way that is dependent on that type.
Input: BOOL (Object)
Output: Boolean value (TRUE/FALSE)

Example:
Consider the example of Chat.dtd as Input Structure and Valid.dtd as Output Structure. Suppose we want to filter out mails that do not have message body. That is, we want that the isMessageExist node of the Output Structure takes the value true if the length of the Message node of the Input Structure is not equal to zero. The BOOL function returns true for a string of length non-zero. Therefore,

  1. Load Input Structure and Output Structure.
  2. Map the Message node of Input Structure to the isMessageExist node of the Output Structure.
  3. Invoke the Function Wizard by right-clicking on the isMessageExist node.
  4. The Function Easel opens with the existing mappings.
  5. Place the BOOL node on the Function Easel.
  6. Link the output of the Message node to the input of the BOOL node.


    Figure 35: Linking Message and BOOl nodes
     
  7. Link the output of the BOOL node to the input of the isMessageExist node.


    Figure 36: Linking BOOL and IsMessageExist nodes

  8. This completes the desired mappings.
isNumber

Visual representation 

Symbol: IsNumber
Description: This function returns TRUE if the input value is a number.
Input: Any value
Output: Boolean value (TRUE/FALSE)

Lookup functions

The functions in this category are used to perform the lookup of keyvalue pairs in a database and return the result in sorted fashion.

Lookup with Default Connection Details

DB
Description: This function accepts a table name, keyvalue pairs and column names as arguments and does the lookup in the database and returns the result in sorted form.
Input: Table name, Key value pairs, Columns names.
Output: String containing the lookup result in sorted order.
Points to note

  • DBLookup fetches the entries from a table and stores them in local cache the first time and it uses this cache to perform lookups for subsequent requests. This cache will not be updated at runtime again. Therefore it should preferably be used only for tables which are not updated once populated, that is for static data.
  • Lookup functions take key columns name value pairs as <column1>=<value1>,<column2>=<value2> etc.

    Syntax

    Icon

    White spaces and quotes are not allowed in the name value pair specification above.

Example: dvSendDept=100,dvSendCode=BLK

  • Lookup functions can return the values of multiple columns. To get multiple columns, use the format <column3>,<column4>. For Example: dvValueDA, dvDescription
  • Dates are expected in MM/dd/yyyy HH:mm:ss format
  • Make sure the input value match the column length defined in the database. For example, if the dvSendCode is defined as char(10) in the database, the input value should be BLK followed by seven spaces.

    Icon

    Spaces are not required if you are using MSSQL 2005.

Prerequisites

  • For usage and testing in eMapper tool, add required database drivers in the eMapper classpath.

For example, if the lookup tables are in HSQL, include the path of hsqldb.jar in Test Classpath table in the Mapper Preferences page in eStudio.

  • To use this function in the eMapper tool, a system property -Dmapper.lookup.dbconfig has to be defined in %FIORANO_HOME%/eStudio/eStudio.ini file and it should point to the path of db.properties file which contains the url, driverName, user and password. Sample db properties file is shown below which contains the data for oracle data base.


Figure 37: Sample db properties file

  • For use in Route transformations, mapper.lookup.dbconfig property has to be set in {FIORANOHOME}/fps/bin/fps.conf.
  • For use in XSLT component, mapper.lookup.dbconfig property has to be included in JVM_PARAMS For example: -Dmapper.lookup.dbconfig=<path of db.properties>

Lookup with Connection Details

DB
Description: This function accepts a table name, keyvalue pairs, column names, url, driver name, user name and password as arguments and does the lookup in the database and returns the result in sorted form.
Input: Table name, Key value pairs, Columns names, URL, driver name, user name and password.
Output: String containing the lookup result in sorted order.

Points to note
  • DBLookup fetches the entries from a table and stores them in local cache the first time and it uses this cache to perform lookups for subsequent requests. This cache will not be updated at runtime again. Therefore it should preferably be used only for tables which are not updated once populated, that is for static data.
  • Lookup functions take key columns name value pairs as <column1>=<value1>,<column2>=<value2> etc.

For example, dvSendDept=100, dvSendCode=BLK
Lookup functions can return value of multiple columns. To get multiple columns, use the format <column3>,<column4>.
For example, dvValueDA, dvDescription

  • Dates are expected in MM/dd/yyyy HH:mm:ss format
  • Make sure the input value match the column length defined in the database. For example, if the dvSendCode is defined as char(10) in the database, the input value should be BLK followed by 7 spaces.
Prerequisites
  • Add required database drivers in the eMapper classpath.

For example, if the lookup tables are in HSQL, include the path of hsqldb.jar in Test Classpath table in the Mapper Preferences page in eStudio.

DBNoCache

Description: This function accepts a table name, keyvalue pairs and column names as arguments and does the lookup in the database and returns the result in sorted form.

Input: Table name, Key value pairs, Columns names.

Output: String containing the lookup result in sorted order.

Points to note
  • Lookup functions take key columns' name value pairs as <column1>=<value1>,<column2>=<value2> etc.
    For e.g. dvSendDept=100, dvSendCode=BLK
  • Lookup functions can return value of multiple columns. To get multiple columns, use the format <column3>,<column4>.
    For e.g. dvValueDA, dvDescription
  • Dates are expected in MM/dd/yyyy HH:mm:ss format
  • Make sure the input value match the column length defined in the database.
    For e.g if the dvSendCode is defined as char(10) in the database, the input value should be BLK followed by 7 spaces.

    Icon

    Spaces are not required if you are using MSSQL 2005.

Prerequisites
  1. Add required database drivers in the Mapper classpath.
    For e.g, if the lookup tables are in HSQL, include the path of hsqldb.jar in Test Classpath table in the Mapper Preferences page in eStudio. (Ref Section 12.2 in eStudio User Guide).
  2. To use this function in Mapper tool, a system property -Dmapper.lookup.dbconfig has to be defined in %FIORANO_HOME%/eStudio/eStudio.ini file and it should point to the path of db.properties file which contains the url, driverName, user and password.
  3. Sample dbproperties file is shown below which contains the data for oracle data base.
     
  4. For use in Route transformations, mapper.lookup.dbconfig property has to be set in {FIORANOHOME}/fps/bin/fps.conf.
  5. For use in XSLT component, mapper.lookup.dbconfig property has to be included in JVM_PARAMS
    For eg: -Dmapper.lookup.dbconfig=<path of db.properties>
DBNoCache

Description; This function accepts a table name, keyvalue pairs, column names, url, driver name, user name and password as arguments and does the lookup in the database and returns the result in sorted form.

Input: Table name, Key value pairs, Columns names, url, driver name, user name and password.

Output: String containing the lookup result in sorted order.

Points to note
  • Lookup functions take key columns' name value pairs as <column1>=<value1>,<column2>=<value2> etc.
    For e.g. dvSendDept=100, dvSendCode=BLK
  • Lookup functions can return value of multiple columns. To get multiple columns, use the format <column3>,<column4>.
    For e.g. dvValueDA, dvDescription
  • Dates are expected in MM/dd/yyyy HH:mm:ss format
  • Make sure the input value match the column length defined in the database. For e.g if the dvSendCode is defined as char(10) in the database, the input value should be BLK followed by 7 spaces.
Prerequisites

Add required database drivers in the Mapper classpath.
For e.g, if the lookup tables are in HSQL, include the path of hsqldb.jar in Test Classpath table in Mapper Preferences page in eStudio.

JMS Message Functions

The various functions in this category extract specific information from a JMS Message and output to the same. The input for these functions is a JMS Message.

Message

Description: Message returns the message object - type is javax.jms.Message.
Output:  Return type is javax.jms.Message

Text Content

Description: The Text Content function returns content which is in text format from a Fiorano document. 
Output: String value

Byte Content

Description: The Byte Content function returns the byte content of a Fiorano document.
Output: Base64 encoded string value

Header

Description: The Header function returns the value of the name that is passed as a property to the function.
Output: String value

Attachment

Description: The Attachment function returns any attachments attached to a Fiorano document. The name of the attachment needs to be passed as a property to the function.
Output: Base64 encoded string value

Application Context

Description: Application context function returns application context present in the message.
Output: String value.

getText

Description: The getText function returns the text associated to a Fiorano message.
Output: String value

getEnvironment

Description: The getEnvironment function returns the value of the "ESBX__SYSTEM__EVENT_PROCESS_ENVIRONMENT" property for the particular Fiorano message
Output: String value

getStringProperty

Description: The getStringProperty property function returns the value of the given property name for that Fiorano message.
Input: Property Name
Output: String value

getByteProperty

Description: The getByteProperty property function returns the value of the given property name for that Fiorano message.
Input:
Property Name
Output: Byte value

getShortProperty

Input: Property Name
Description: The getShortProperty property function returns the value of the given property name for that Fiorano message.
Output: short value

getIntProperty

Input: Property Name
Description: The getIntProperty property function returns the value of the given property name for that Fiorano message.
Output: int value

getLongProperty

Description: The getLongProperty property function returns the value of the given property name for that Fiorano message.
Input: Property Name
Output: long value

getFloatProperty

Description: The getFloatProperty property function returns the value of the given property name for that Fiorano message.
Input: Property Name
Output: float value

getDoubleProperty

Description: The getDoubleProperty property function returns the value of the given property name for that Fiorano message.
Input: Property Name
Output: double value

getBooleanProperty

Description: The getBooleanProperty property function returns the value of the given property name for that Fiorano message.
Input: Property Name
Output: boolean value

getObjectProperty

Description: The getObjectProperty property function returns the value of the given property name for that Fiorano message.
Input: Property Name
Output: object

getJMSCorrelationID

Description: The getJMSCorrelationID function returns the correlationID of the Fiorano message.
Output: string value

JMSPropertyType

Description: The JMSPropertyType function returns the property type of the Fiorano message.
Output: string value

setText

Description: The setText function sets the text of the Fiorano message to given input value
Input: text to which message's text to be set
Output: string value

Icon

The output node has to be connected to some funclet node to make this work.

setMessagePriority

Input: String value of the priority which has to be set to the Fiorano message
Description: The setMessagePriority function sets the given input value of the priority to the Fiorano message
Output: The function does not return anything

Icon

The output of the function node has to be connected to an output node from the output XML for this to work. This will not affect the output XML generated.

resetMessagePriority

Description: The resetMessagePriority function removes the value of the setMessagePriority property for the particular Fiorano message
Output: The function does not return anything

setStringProperty

Description: The setStringProperty function sets the property of the Fiorano message to given input value
Input: name of the property and string value of the property to which message's property has to be set
Output: The function does not return anything.

Icon

The output of the function node has to be connected to any output node from the output XML for this to work. This will not affect the output XML generated.

setByteProperty

Description: The setByteProperty function sets the property of the Fiorano message to given input value
Input: name of the property and byte value of the property to which message's property has to be set
Output: The function does not return anything.

Icon

The output of the function node has to be connected to any output node from the output XML for this to work. This will not affect the output XML generated.

setShortProperty

Description: The setShortProperty function sets the property of the Fiorano message to given input value
Input: Name of the property and short value of the property to which message's property has to be set
Output: The function does not return anything.

Icon

The output of the function node has to be connected to any output node from the output XML for this to work. This will not affect the output XML generated.

setIntProperty

Description: The setIntProperty function sets the property of the Fiorano message to given input value
Input: Name of the property and int value of the property to which message's property has to be set 
Output: The function does not return anything.

Icon

The output of the function node has to be connected to any output node from the output XML for this to work. This will not affect the output XML generated.

setLongProperty

Description: The setLongProperty function sets the property of the Fiorano message to given input value
Input: name of the property and long value of the property to which message's property has to be set 
Output: The function does not return anything.

Icon

The output of the function node has to be connected to any output node from the output XML for this to work. This will not affect the output XML generated.

setFloatProperty

Description: The setFloatProperty function sets the property of the Fiorano message to given input value
Input: Name of the property and float value of the property to which message's property has to be set
Output: The function does not return anything.

Icon

The output of the function node has to be connected to any output node from the output XML for this to work. This will not affect the output XML generated.

setDoubleProperty

Description: The setDoubleProperty function sets the property of the Fiorano message to given input value
Input: Name of the property and double value of the property to which message's property has to be set
Output: The function does not return anything.

Icon

The output of the function node has to be connected to any output node from the output XML for this to work. This will not affect the output XML generated.

setBooleanProperty

Description: The setBooleanProperty function sets the property of the Fiorano message to given input value
Input: Name of the property and boolean value of the property to which message's property has to be set
Output: The function does not return anything.

Icon

The output of the function node has to be connected to any output node from the output XML for this to work. This will not affect the output XML generated.

setObjectProperty

Description: The setObjectProperty function sets the property of the Fiorano message to given input value
Input: name of the property and object value of the property to which message's property has to be set
Output: string value

Icon

The output node has to be connected to some funclet node to make this work.

removeProperty

Description: The removeProperty function removes the given property from the Fiorano message
Input: name of the property which has to be removed
Output: The function does not return anything.

Icon

The output of the function node has to be connected to any output node from the output XML for this to work. This will not affect the output XML generated.

setJMSCorrelationID

Description: The setJMSCorrelationID function sets the correlationID of the Fiorano message to given input value
Input: value of the correlationID to which message's correlationID has to be set
Output: The function does not return anything.

Icon

The output of the function node has to be connected to any output node from the output XML for this to work. This will not affect the output XML generated.

User-defined Functions

The various functions in this category are user defined and perform various functionalities.

myExt:compute

Description: This user-defined function can be used to compute all mathematical operations such as Addition, Subtraction, Multiplication and division of numbers. The function does not compute mathematical operations such as cos, sin, etc.
Input: A valid javascript expression
Output: A number

myExt: replace

Description: This user-defined function replaces parts of a string that match a regular expression with another string.
string regexp:replace(string, string, string, string)
Input: The function accepts four arguments. The first argument is the string to be matched and replaced. The second argument is a regular expression that follows the Javascript regular expression syntax. The fourth argument is the string to replace the matched parts of the string. 
The third argument is a string consisting of character flags to be used by the match. If a character is present then that flag is true. The flags are:

  • g: global replace - all occurrences of the regular expression in the string are replaced. If this character is not present, then only the first occurrence of the regular expression is replaced.
  • i: case insensitive - the regular expression is treated as case insensitive. If this character is not present, then the regular expression is case sensitive.

Output: String

Adaptavist ThemeBuilder EngineAtlassian Confluence