- Welcome
- Introducing Babelway B2B Integration
- Starting with Babelway
- Managing Account Environments
- Managing Channels
- The Catalogue
- Tracking Messages
- Managing Alerts
- Managing Your Account
- Best Practices
- Channels
- List of Channels
- View Change Log
- General
- Gateway In
- Message In
- Transformation
- Message Out
- Gateway Out
- Email Gateway Out
- Ftp Client Gateway Out
- SFTP Client Gateway Out
- Ftp Server Gateway Out
- AS2 Gateway
- Http Client Out Gateway
- Web Gateway
- Generic Gateway
- Internal Gateway Out
- Null Gateway
- OFTP Server Gateway out
- OFTP client Gateway out
- Http Out Gateway
- SOAP Gateway
- Soap Client Out Gateway
- X.400 Gateway out
- Aggregator Gateway Out
- Email Gateway Out
- Email Notifications
- Routing
- Testing
- List of Channels
- Building a Channel
- The Catalogue
- Tracking Messages
- Alerts
- Account Management
- Rest API
- Receive Orders From
- Receive Orders from Colruyt
- Receive Orders from Carrefour
- Receive Orders from Brico
- Receive Orders from Castorama
- Receive Orders from Cora BE
- Receive Orders from Delfood
- Receive Orders from Delhaize
- Receive Orders from DEliXL
- Receive Orders from Intergamma
- Receive Orders from Intermarche
- Receive Orders from JavaFresh
- Receive Orders from Makro
- Receive Orders from Match
- Receive Orders from Carrefour France
- Receive Orders from Colruyt
- Integrate Orders with
- Integration with Tradeshift
- Integration with Exact Online or Exact Globe
- Channel:SAP Idoc XML Order05 w/ Http client out
- System Metadata
- ODETTE Messages List
- External References
See: Managing Channels - Message Transformation Functions
In the drag and drop transformation pane, several transformations are available to configure your transformation proces.
The message transformation configuration is explained in the Transformation chapter. This topic lists all available functions.
Once you have added a transformation function, drag required node(s) to the newly added transformation function in the order they are going to be used by the selected function, then map the function node to the desired output node.
Constant String
A Constant String, as it names implies, allows you to create a string of characters that can be used elsewhere in your mapping either alone or combined with other items. You can further format this string using Format String function described hereunder. As illustrated, this function requires a Name, an optional Description and the constant string Value.
Constant Number
A Constant Number, as it names implies, allows you to create a number that can be used elsewhere in your mapping either alone or combined with other items. You can further format this number using Format Number function described hereunder. As illustrated, this function requires a Name, an optional Description and the constant number Value.
Current Date/Time
The Current Date/Time function, as it names implies, allows you to retrieve the current complete date (including time) and to use elsewhere in your mapping either alone or combined with other items. You can further format this date using Format Date function described hereunder. As illustrated, this function requires only a Name and an optional Description.
Custom Xpath expression
The Custom Xpath expression function allows you to define your own Xpath expression. For more information about Xpath syntax, see Xpath in External References chapter in appendix.
You can drag and drop any number of element on this custom function. In the order they are dropped, each element is binded to an argument $argN. $arg1 for the first, $arg2 for the second... You can use these argument in the Xpath expression.
Example 2.1.
string-length($arg1)
concat($arg1,' - ',$arg2)
metadata-util:put($MSG,'com_babelway_messaging_context_message_reference', bfn:concat('YOUR_PREFIX', 'YOUR_SEPARATOR', 'YOUR_SUFFIX', metadata-util:get($MSG,'com_babelway_messaging_context_message_reference'), $arg1))metadata-util:getAsBase64($MSG, 'attachment:Invoice.pdf')
You can also use the special argument $ARGS which correspond to the sequence of elements dropped, ie.: $ARGS = ($arg1, $arg2, $arg3, ..., $argN)
This function requires a Name, an optional Description and the Xpath expression including one or more arguments if required.
By default, if the xpath expression use number values, the resulting number has only eleven significant digits. If you need more significant digits, you can either use the Big Number Xpath expression or you can explicitly cast the arguments using xs:decimal($arg1).
Note that all transformation functions can be replaced directly by their Xpath expression. All other functions are available for easy and quick message transformation, while Xpath expression allows for more specific or more complex operations.
Babelway is providing a set of useful predefined xpath functions. These are functions accessible through the right menu but they could also be used in more complexe xpath expression. Here is the list of available functions:
same as Current Date function | |
same as Format Date function | |
date-util:formatDateLenient('date', 'formatIn', 'formatOut', true) | same as Format Date function, except that it allows to use a loose date parsing. For instance Apr 31 will be parsed as May 1st. |
return the MD5 hash for the string argument. | |
return the SHA1 hash for the string argument. | |
return the SHA256 hash for the string argument. | |
return the SHA512 hash for the string argument. | |
String lookup:addLookupTableEntry(String lookupTableId, String[] cols) | same as addLookupTableEntry in context menu |
String lookup:addLookupTableEntry(String lookupTableId,String colNameIn, String[] cols) | same as addLookupTableEntry in context menu |
String lookup:sharedLookupTableValue(String tableShareKey, int colIndexIn, int colIndexOut, String whenNoResult, String defaultValue, String key) | same as sharedLookupTableValue in context menu |
String lookup:sharedLookupTableValue(String tableShareKey, int colIndexIn, int colIndexOut, String whenNoResult, String defaultValue, String key, boolean subStringQuery) | same as sharedLookupTableValue in context menu |
String lookup:sharedLookupTableValue(String tableShareKey, int colIndexIn, int colIndexOut, String whenNoResult, String defaultValue, String key, boolean subStringQuery, boolean messageCache) | same as sharedLookupTableValue in context menu |
String lookup:lookupTableValue(String tableid, String colNameIn, String colNameOut, String whenNoResult, String defaultValue, String key) | same as lookupTableValue in context menu |
String lookup:lookupTableValue(String tableid, String colNameIn, String colNameOut, String whenNoResult, String defaultValue, String key, boolean subStringQuery) | same as lookupTableValue in context menu |
String lookup:lookupTableValue(String tableid, String colNameIn, String colNameOut, String whenNoResult, String defaultValue, String key, boolean subStringQuery, boolean messageCache) | same as lookupTableValue in context menu |
return a auto incrementing number | |
return the metadata with this name | |
add a metadata with the given name and value | |
return the metadatavalue encoded as Base64 | |
return an object encoded as Base64 | |
return an object decoded as Base64 | |
return replace metadata in the given string | |
String number-util:formatNumber(Number number, String format) | same as formatNumber in context menu |
String number-util:formatNumber(String number, String formatIn, String formatOut) | same as formatNumber in context menu |
String string-util:paddingString(String str, int strSize, String padding, String align) | same as paddingString in context menu |
return this string unescaped from the xml encoding | |
return this string unescaped from the html encoding | |
return this string unescaped from the filename encoding | |
return this string escaped with the xml encoding | |
return this string escaped with the html encoding | |
return this string escaped with the filename encoding | |
raise an error if the assertion is not true | |
void validate:assertFalse(boolean assertion, String message) | raise an error if the assertion is not false |
return true if the assertion is true | |
boolean validate:validateDateLenient(String date, String formatIn, boolean lenient) | return true if date is valid |
void validate:assertDateValid(String date, String formatIn, String formatOut, String message) | return true if date is valid |
void validate:assertDateValid(String date, String formatIn, String formatOut, String message, boolean lenient) | return true if date is valid |
return the content of the message in corresponding to the message key uuid | |
String enrich:getMessageIn(String uuid boolean ignoreMissing) | return the content of the message in corresponding to the message key uuid |
String enrich:getMessageIn(String uuid, boolean omitXmlDeclaration, boolean ignoreMissing) | return the content of the message in corresponding to the message key uuid |
return the content of the message xml in corresponding to the message key uuid | |
String enrich:enrich:getXmlIn(String uuid, boolean omitXmlDeclaration) | return the content of the message xml in corresponding to the message key uuid |
String enrich:enrich:getXmlIn(String uuid, boolean omitXmlDeclaration, boolean ignoreMissing) | return the content of the message xml in corresponding to the message key uuid |
return the content of the message xml out corresponding to the message key uuid | |
String enrich:enrich:getXmlOut(String uuid, boolean omitXmlDeclaration) | return the content of the message xml out corresponding to the message key uuid |
String enrich:enrich:getXmlOut(String uuid, boolean omitXmlDeclaration, boolean ignoreMissing) | return the content of the message xml out corresponding to the message key uuid |
return the content of the message out corresponding to the message key uuid | |
String enrich:getMessageOut(String uuid, boolean omitXmlDeclaration) | return the content of the message out corresponding to the message key uuid |
String enrich:getMessageOut(String uuid, boolean omitXmlDeclaration, boolean ignoreMissing) | return the content of the message out corresponding to the message key uuid |
String bfn:concat(String prefix, String separator, String suffix, String list) | return the concatenaition using prefix, suffix and separator |
return substring | |
String bfn:replace(String str , String searchStr, String replaceStr, String ignoreCase) | return replace |
return the same loop of elements but sorted using the sort-key | |
return the same loop of elements but sorted using the sort-key case insensitive | |
return the same loop of elements but sorted using the sort-key numeric | |
return a new line | |
search the message records and creates an xml as the result. This xml can optionally contain the actual content of the messages. |
Request example:
enrich:searchMessage('2012-01-30T00:00:00')result:
<?xml version="1.0" encoding="UTF-8"?>
<messages>
<message id="9999999" key="7b65d710-ef9b-9999-83ad-deef8b47aaae">
<record>
<channelId>99999</channelId>
<errorDescription>Message is not equal to metadata : {metadataName}
</errorDescription>
<gatewayInId>99999</gatewayInId>
<gatewayInMessageKey>7b65d710-ef9b-4718-83ad-deef8b47aaae
</gatewayInMessageKey>
<gatewayInMessageStatus>Related to message
6e57d755-9cf1-9999-a94c-0b7ede2a9869 </gatewayInMessageStatus>
<gatewayInTimestamp>2012-01-29T09:07:48</gatewayInTimestamp>
<gatewayOutTimestamp>2012-01-29T09:07:49</gatewayOutTimestamp>
<hubId>999999</hubId>
<id>999999</id>
<inSize>17257</inSize>
<messageFormatFileNameIn>2549518.edi</messageFormatFileNameIn>
<messageFormatFileNameOut>2549518.edi</messageFormatFileNameOut>
<messageFormatInHash>93f112bdb52b33e...</messageFormatInHash>
<messageFormatInSignHash>3f20f88...</messageFormatInSignHash>
<messageFormatOutHash>826c6ad23da17...</messageFormatOutHash>
<messageFormatOutSignHash>984cc...</messageFormatOutSignHash>
<messageFormatToXmlTimestamp>2012-01-29T09:07:48
</messageFormatToXmlTimestamp>
<messageKey>7b65d710-ef9b-4718-83ad-deef8b47aaae</messageKey>
<messageReference>25495189.edi</messageReference>
<outSize>5817</outSize>
<parentMessageId>5741867</parentMessageId>
<receiveTimestamp>2012-01-29T09:07:48</receiveTimestamp>
<status>DONE</status>
<type>REGULAR</type>
<xmlInSize>17257</xmlInSize>
<xmlOutSize>10924</xmlOutSize>
<xmlToMessageFormatElapse>22</xmlToMessageFormatElapse>
<xmlToMessageFormatTimestamp>2012-01-29T09:07:49
</xmlToMessageFormatTimestamp>
<xmlToXmlElapse>7</xmlToXmlElapse>
<xmlToXmlTimestamp>2012-01-29T09:07:48</xmlToXmlTimestamp>
</record>
</message>
<message id="9999999" key="7b65d710-ef9b-9999-83ad-deef8b47aaae">
...
</message>
</messages>
Big Number Xpath expression
The Big Number Xpath expression function as the same purpose as the Custom Xpath Expression except that it is meant to only accpet numbers as arguments and only return a number. All arguments are treated as big numbers allowing calculation requiring more than eleven significant digits.
This function requires a Name, an optional Description and the Xpath expression including one or more arguments if required (see Custom Xpath expression for more information about arguments).
Format Number
The Format Number function allows you to format any number according to your specific needs. A short description of available symbols is given in the dialog box as illustrated. This function requires a Name, an optional Description, an optional Source Format and a Target Format.
Example 2.3.
For example, 1234 will be displayed as "01234.00" using a "00000.00" format or as "1,234.0" using a "#,###.0" format.
Format String
The Format String function allows you to format any string of character according to your specific needs. This function requires a Name, an optional Description, and three format parameters: Size to define the string length, Padding Character to define the character used to fill empty spaces and Align to define where the original string is aligned ( Left with padding characters added right, Right with padding characters added left or Center with padding characters distributed on both sides).
Format Date
The Format Date function allows you to format any date and time according to your specific needs. A short description of available symbols is given in the dialog box as illustrated. This function requires a Name, an optional Description, an optional Date format In and a Date Format out.
Example 2.4.
For example, a date will be displayed as "15-Sep-2009" using a " dd-MMM-yyyy" format or as "2009-09-15" using a "yyyyy-MM-dd" format.
Arithmetic Operations
All arithmetic operations, allows you to arithmetically combine two arguments. As illustrated, these functions require only a Name and an optional Description.
Add(+) function returns the sum of both numbers entered as arguments.
Multiply(*) function returns the product of both numbers entered as arguments.
Minus(-) function returns the difference of both numbers entered as arguments.
Div function returns the integer part of the division of both numbers entered as arguments.
Mod function returns the reminder of the division of both numbers entered as arguments.
Concat
The Concat function allows you to concatenate together two strings to form a new one. You can also add additional characters before, between and/or after both concatenated strings. As illustrated, this function requires a Name, an optional Description, and three optional format parameters to define additional characters to be added in front of ( Prefix ) and behind ( Suffix ) the concatenated string and between ( Separator ) both original strings.
Replace
The Replace function allows you to replace, inside a string, a defined pattern by another one. As illustrated, this function requires a Name, an optional Description, a Search Pattern defining the character or string to be searched and replaced and a Replace Pattern defining the new character or string that will replace the found one inside the string. If Ignore case? is checked, the search will be case insensitive.
Substring
The Substring function returns a substring of the attached argument starting at the position specified in the From field and ending at the position specified in To field. As illustrated, this function requires a Name, an optional Description, a From defining the character starting position,and To defining the character ending position.
Lookup Table - Lookup Table
The Lookup Table function allows you to replace an item with the matching item from a lookup table. To use this function, first you select a lookup table in Table name drop down list. Then you select In column, this is the column where the item will be searched for. If a match is found, the value in selected Out column will be returned. In and Out are fields are selected from lookup table available columns. If no match is found, the result will depends on the When no result setup ( Default value will return the value defined in the following Default value field, Same value will return as output the incoming value, Raise Error will return an error in such a case). As illustrated, this function also requires a Name and an optional Description.
Lookup Table - Shared Lookup Table
The use of a shared lookup table is the same as a standard lookup table but for its name that is replaces by its Access Key (automatically defined when lookup table is defined as shared) and In and Out that are respectively replaced by Column index of the source and Column index of the destination.
Lookup Table - Add Lookup Table Entry
You can add an new entry in your lookup table using this transformation function. As illustrated, this function requires a Name, an optional Description, Table name, Replace based on column
A compléter
Lookup Table - Lookup Table Increment Value
The transformation function “Lookup Table Increment Value” is used to increase a lookup table value by 1. It could be used to implement a persistent counter. As illustrated, this function requires a Name, an optional Description, Table name, In and Out column
A compléter
Babel Academy
Community Forum
Support



Prev

















Up
Reference Manual