GDSN Binds
Business actions used in the GDSN Provider and the GDSN Receiver solutions have additional parameters that can be configured to extract information from the GDSN XML files using XPath expressions.
Bind Name |
Description |
---|---|
GDSN Product |
Binds the selected GDSN product for use in the Pre action business action parameter or in the validation conditions. |
GDSN Provider Datapool |
Binds the selected GDSN provider datapool for use in the Pre action business action parameter or in the validation conditions. |
GDSN Provider Message Exception Description |
In JavaScript business actions, this binds the GDSN Message Exception description which is stored in the background process. |
GDSN Provider Message Exception File |
For JavaScript business actions, this bind will provide the GDSN Message Exception file. |
GDSN Provider Message Original File |
This bind will provide the original outbound message file. |
GDSN Provider Original Node |
This bind will provide the node (the product) that was send to GDSN. Used when configuring GDSN failure message handling. |
GDSN Publisher Data Map |
For a business action used by the GDSN Provider, this bind can get the value of a specific XPath. The XPath value can subsequently be used to retrieve the corresponding string in the GDSN XML file. |
GDSN Publisher Product Validation |
Deprecated. Provides access to information about a product instance that is registered for a given data pool. For example, this could be used to write a script that can validate if all required attributes for a given data receiver have been populated on a given product. |
GDSN Receiver Data Map |
For a business action used by the GDSN Receiver, this bind can get the value of a specific XPath. The XPath value can subsequently be used to retrieve the corresponding string in the GDSN XML file. |
GDSN Receiver Message Exception Description |
In JavaScript business actions, this binds the GDSN Message Exception description which is stored in the background process. |
GDSN Receiver Message Exception File |
For JavaScript business actions, this bind will provide the GDSN Message Exception file. |
GDSN Receiver Message Original File |
This bind will provide the original outbound message file. |
GDSN Receiver Original Node |
This bind will provide the node (the product) that was send to GDSN. Used when configuring GDSN failure message handling. |
GDSN Receiver Packaging Product |
The bind will return the current product as a GDSN Receiver packaging member node. This makes it possible to set various CIC related information on the products in a java script. |
GDSN Receiver REST CIC Status |
The bind is used as a parameter when executing the business actions configured through the Setup Entities. The business actions configured are used to communicate the CIC status that is to be sent to the GDSN datapool. For more information, refer to the CIC handling section of the GDSN Trade Item Implementation Guide, which can be found on the GS1 website. The binding exposes the following methods: String getCICStatus() Get the status value for a CIC object. Valid values are:
Example of use: Copy
Map<String, List<String>> corrections() Get the map of corrections code and list of descriptions for the review command. Note: The map is read only, so changes will not be taken into account. Example of use: Copy
|
GDSN Recipient |
Binds the selected GDSN recipient for use in the Pre action business action parameter or in the validation conditions. |
GDSN Target Market |
Binds the selected GDSN target market for use in the Pre action business action parameter or in the validation conditions. |
GDSN Validation Logger |
Access the GDSN validation logger for use in the Pre action business action parameter or in the validation conditions. |
XPath Expressions
Each XPath expression is bound to a parameter name. Use the Inbound format settings for business actions in the Workbench to configure XPath expressions.
Bindings use the following method to evaluate the XPath and extract the value of a parameter:
String get(String key)
For example, assume you have a business action with two parameter binds:
Parameter 1:
- name: ResponseCode
- xPath:
//catalogueResponse/documentException/publication/description/@code
Parameter 2:
- name: DocumentException
- xPath:
//catalogueResponse/documentException/publication/description/text()
In this example business action, the Data Map bind has the variable name 'dataMap'.
The following JavaScript code includes the new variable 'attributeValue', which is created by concatenating the value of the XPath for the ReponseCode parameter with the value of the XPath for the DocumentException parameter:
var attributeValue = dataMap.get("ResponseCode") + ": " + dataMap.get("DocumentException");
The GDSN Publisher Data Map bind has a getBlockValues method that can fetch a list of strings from a repeated XML block. The parameter is configured on the business action in the Inbound format configuration. The configuration is an XPath that specifies a repeated XML block and an XPath that extracts the needed content from the repeated XML block:
List<String> getBlockValues(String blockKey)