Version: 17.07
Supported Since: 17.07
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.
You should generally be able to adapt the above snippet to any UN/EDIFACT document type of your choice,
by replacing the |
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. |
<?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.
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.
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.