extract unedifact data element

Extract UN/EDIFACT Data Element

Version: 17.07

Supported Since: 17.07

What is an Extract UN/EDIFACT Data Element Processor?

Extract UN/EDIFACT Data Element Processor is a processing element which can be used to extract an UN/EDIFACT data element as a string from an integration flow and set it to a scope variable.

In order to use this processing element, you must first select the EDI Processors dependency from the processor list when you are creating an empty Ultra project. If you have already created a project, you can add this dependency via Component Registry. From Tools menu, select Ultra Studio → Component Registry and from the Processors list, select the EDI Processors dependency.

Alternatively, you can add the following dependency to the maven pom.xml manually.

<dependency>
    <groupId>org.adroitlogic.x.processors</groupId>
    <artifactId>x-processor-edi</artifactId>
    <version>17.07.2</version>
</dependency>
You would also need to add dependencies that would be required by the types of UN/EDIFACT documents that you wish to process. The following example shows the addition of such a mapping dependency for D93A, to pom.xml:
<dependency>
    <groupId>org.milyn.edi.unedifact</groupId>
    <artifactId>d93a-mapping</artifactId>
    <version>1.4</version>
    <exclusions>
        <exclusion>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </exclusion>
    </exclusions>
</dependency>

You should generally be able to adapt the above snippet to any UN/EDIFACT document type of your choice, by replacing the d93a segment on the third line with the lowercase name of the required document type. For example, for D11A documents, the third line would resemble <artifactId>d11a-mapping</artifactId>.

extract unedifact data element outports

Out Ports

Next

The message will be sent to this out port if extracting the UN/EDIFACT data element is successful

On Exception

The message will be sent to this out port if the processing element failed in extracting the UN/EDIFACT data element

Parameters

Variable Name *

Basic

The name of the variable which should be used to save the extracted value

Data Element *

Basic

The name of the UN/EDIFACT data element to be extracted

XPath *

Basic

Custom XPath to extract the string value from the message payload.

Setting this parameter is only available on CUSTOM DATA ELEMENT property.

Sample Use Case

In the following use case, the requirement is to route EDI files from a common local directory to a set of other directories based on their message types. During this integration flow Extract UN/EDIFACT Data Element processing element is used to extract the message identifier (2nd fragment of UNH segment) from the current message payload and set it to a scope variable.

extract_uniedifact_data_element_sample
Figure 1: extract_unedifact_data_element_sample

Configuration of the Extract UN/EDIFACT Data Element is as follows. To determine the message type, we have selected MESSAGE_TYPE for the Data Element.

extract_uniedifact_data_element_config
Figure 2: extract_unedifact_data_element_config
In this topic
In this topic
Contact Us