order edi extractor

UN/EDIFACT Purchase Order Extractor

Version: 17.07

Supported Since: 17.07

What is an UN/EDIFACT Purchase Order Extractor Processor?

UN/EDIFACT Purchase Order Extractor Processor is a processing element which can be used to extract UN/EDIFACT purchase order messages from the current message payload and assign it back to the current message as an XML payload.

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>.

order edi extractor outports

Out Ports

Next

The message will be sent to this out port if the extraction of the UN/EDIFACT purchase order message is successful.

On Exception

The message will be sent to this out port if the processing element failed to process the message payload as an UN/EDIFACT purchase order document.

Output Format

<?xml version="1.0" encoding="UTF-8"?>
<Purchase_Orders>
  <Purchase_Order>
    <ORDERS>
          <Beginning_of_message>
                <DOCUMENT_MESSAGE_NAME>
                  <Document_message_name__coded>220</Document_message_name__coded>
                </DOCUMENT_MESSAGE_NAME>
            <Document_message_number>2047833</Document_message_number>
            <Response_type__coded>AE</Response_type__coded>
          </Beginning_of_message>
          <Date_time_period>
                <DATE_TIME_PERIOD>
                  <Date_time_period_qualifier>137</Date_time_period_qualifier>
                  <Date_time_period>200410220856</Date_time_period>
                  <Date_time_period_format_qualifier>203</Date_time_period_format_qualifier>
                </DATE_TIME_PERIOD>
          </Date_time_period>
          <Date_time_period>
                <DATE_TIME_PERIOD>
                  <Date_time_period_qualifier>2</Date_time_period_qualifier>
                  <Date_time_period>20041028</Date_time_period>
                  <Date_time_period_format_qualifier>102</Date_time_period_format_qualifier>
                </DATE_TIME_PERIOD>
          </Date_time_period>
          <Segment_Group_2>
                <Name_and_address>
                  <Party_qualifier>BY</Party_qualifier>
                  <PARTY_IDENTIFICATION_DETAILS>
                        <Party_id_identification>7080000000487</Party_id_identification>
                        <Code_list_responsible_agency__coded>9</Code_list_responsible_agency__coded>
                  </PARTY_IDENTIFICATION_DETAILS>
                </Name_and_address>
            <Segment_Group_3>
              <Reference>
                        <REFERENCE>
                          <Reference_qualifier>VA</Reference_qualifier>
                          <Reference_number>NO936560288MVA</Reference_number>
                        </REFERENCE>
                  </Reference>
                </Segment_Group_3>
          </Segment_Group_2>
          <!-- Some segment groups have been removed -->
          <Segment_Group_25>
                <Line_item>
                  <Line_item_number>8</Line_item_number>
                  <ITEM_NUMBER_IDENTIFICATION>
                        <Item_number>7021860162021</Item_number>
                        <Item_number_type__coded>EN</Item_number_type__coded>
                  </ITEM_NUMBER_IDENTIFICATION>
                </Line_item>
            <Additional_product_id>
                  <Product_id_function_qualifier>1</Product_id_function_qualifier>
                  <ITEM_NUMBER_IDENTIFICATION_-_-1>
                        <Item_number>16202</Item_number>
                        <Item_number_type__coded>SA</Item_number_type__coded>
                        <Code_list_responsible_agency__coded>91</Code_list_responsible_agency__coded>
                  </ITEM_NUMBER_IDENTIFICATION_-_-1>
                </Additional_product_id>
                <Item_description>
                  <Item_description_type__coded>F</Item_description_type__coded>
                  <ITEM_DESCRIPTION>
                    <Item_description_-_-1>KRYDDERSILDFILET ENG.250G</Item_description_-_-1>
                  </ITEM_DESCRIPTION>
                </Item_description>
                <Quantity>
                  <QUANTITY_DETAILS>
                    <Quantity_qualifier>21</Quantity_qualifier>
                        <Quantity>15</Quantity>
                        <Measure_unit_qualifier>PCE</Measure_unit_qualifier>
                  </QUANTITY_DETAILS>
                </Quantity>
          </Segment_Group_25>
          <Section_control>
                <SECTION_IDENTIFICATION>S</SECTION_IDENTIFICATION>
          </Section_control>
          <Control_total>
                <CONTROL>
                  <Control_qualifier>2</Control_qualifier>
                  <Control_value>8</Control_value>
                </CONTROL>
          </Control_total>
        </ORDERS>
  </Purchase_Order>
</Purchase_Orders>

The above is a D93A UN/EDIFACT purchase order document. In this example the Purchase_Orders tag is the root tag and the Purchase_Order tag is an individual message tag. Note that few segment groups have been removed.

Parameters

Message Tag Name

Advanced

The tag name to be used for individual messages in the transformed XML output. The default value is Purchase_Order.

Root Tag Name

Advanced

The root tag name in the transformed XML output. The default value is Purchase_Orders.

Sample Use Case

In the following use case, the requirement is to read an EDI file from a local directory, convert it from UN/EDIFACT format to XML format, and persist it to another local directory.

purchase_order_edi_extractor_sample
Figure 1: purchase_order_edi_extractor_sample

In this integration flow an UN/EDIFACT Purchase Order Extractor processing element is used to extract purchase order messages from the current message payload and persist the extracted messages using a Payload Saver.

In this topic
In this topic
Contact Us