At this stage the envelopes are set we can now have a look at the BPs.
We can also have a BP to process the translated files (the GENERIC_DEENVELOPE_PROCESS used in part 2), we use the default configured file system adapter that points to ..\install\ediinbound\extract
Once you have the BPs deployed in Sterling we can start testing to see results.
This will be the test EDI, it has to be an CONTRL message as specified on part 2 for UNH level. The elements present in the envelope are marked in bold. The sender/receiver pair was set with a * so they can have any value. Note that Sterling first looks for existing envelopes with sender receiver value in the input message and only after that it goes for the * marked envelope, as for the scope of the tutorial we don't have any more envelopes set but one can play around with the concept.
UNA:+.? '
UNB+UNOA:1+SENDER+RECEIVER+090520:0638+157'
UNH+115700001+CONTRL:2:1:UN'
UCI+200905200086+SENDER+RECEIVER+7'
UCM+905201914+IFTMBC:D:99B:UN+4++FTX'
UCS+8+15'
UCM+905201915+IFTMBC:D:99B:UN+4++FTX'
UCS+8+7'
UNT+7+115700001'
UNZ+1+157'
Applying this file as input to the GENERIC_DEENVELOPE input.
UNA:+.? '
UNB+UNOA:1+SENDER+RECEIVER+090520:0638+157'
UNH+115700001+CONTRL:2:1:UN'
UCI+200905200086+SENDER+RECEIVER+7'
UCM+905201914+IFTMBC:D:99B:UN+4++FTX'
UCS+8+15'
UCM+905201915+IFTMBC:D:99B:UN+4++FTX'
UCS+8+7'
UNT+7+115700001'
UNH+115700002+CONTRL:2:1:UN'
UCI+200905200086+SENDER+RECEIVER+7'
UCM+905201914+IFTMBC:D:99B:UN+4++FTX'
UCS+8+15'
UCM+905201915+IFTMBC:D:99B:UN+4++FTX'
UCS+8+7'
UNT+7+115700002'
UNZ+1+157'
The first BP is the one that receives the raw EDI file and is responsible to call identify the correct envelope. We are going to run this manually and set upload an init PrimaryDocument, therefore it simple has a EDIFACT DeEnvelope service. This is being called GENERIC_DEENVELOPE.
We can also have a BP to process the translated files (the GENERIC_DEENVELOPE_PROCESS used in part 2), we use the default configured file system adapter that points to ..\install\ediinbound\extract
This will be the test EDI, it has to be an CONTRL message as specified on part 2 for UNH level. The elements present in the envelope are marked in bold. The sender/receiver pair was set with a * so they can have any value. Note that Sterling first looks for existing envelopes with sender receiver value in the input message and only after that it goes for the * marked envelope, as for the scope of the tutorial we don't have any more envelopes set but one can play around with the concept.
UNA:+.? '
UNB+UNOA:1+SENDER+RECEIVER+090520:0638+157'
UNH+115700001+CONTRL:2:1:UN'
UCI+200905200086+SENDER+RECEIVER+7'
UCM+905201914+IFTMBC:D:99B:UN+4++FTX'
UCS+8+15'
UCM+905201915+IFTMBC:D:99B:UN+4++FTX'
UCS+8+7'
UNT+7+115700001'
UNZ+1+157'
Applying this file as input to the GENERIC_DEENVELOPE input.
This should be the result. Note all the metadata that is inserted into process data, this can be used for further processing as per sending mail alert messages of file arrival.
If you have deployed the BP GENERIC_DEENVELOPE_PROCESS and the map DT_MAP_GENERIC_CONTRL_D99B_UN_TO_XML, the DeEnvelope service should have started a second BP. If there is nothing more running on Sterling it should be available in the current processes.
Note the parent/child relationship. You can use <message_to_child> on process data of GENERIC_DEENVELOPE to send information to child process, just like as using Invoke service.
Finally the file should have been dropped in the extraction folder, by the GENERIC DEENVELOPE.
Here is the file output.
A final note if you use a file with multiple UNH level you should get multiple BPs being started. Testing with the same UNH replicated twice in the input file (just changed the reference number).
UNB+UNOA:1+SENDER+RECEIVER+090520:0638+157'
UNH+115700001+CONTRL:2:1:UN'
UCI+200905200086+SENDER+RECEIVER+7'
UCM+905201914+IFTMBC:D:99B:UN+4++FTX'
UCS+8+15'
UCM+905201915+IFTMBC:D:99B:UN+4++FTX'
UCS+8+7'
UNT+7+115700001'
UNH+115700002+CONTRL:2:1:UN'
UCI+200905200086+SENDER+RECEIVER+7'
UCM+905201914+IFTMBC:D:99B:UN+4++FTX'
UCS+8+15'
UCM+905201915+IFTMBC:D:99B:UN+4++FTX'
UCS+8+7'
UNT+7+115700002'
UNZ+1+157'
There should be a second BP, you can use
Batch transactions received within a functional group into one output document
on the UNH envelope to stack files over each other in the ourput document and only have one children BP.
There's plenty of options to explore and each can be applied as the best stratagy for a certain situation but this is the basic flow of work for DeEnveloping (and translate) an EDI document in Sterling. On next tutorials I'll be looking at the Enveloping side.
Sem comentários:
Enviar um comentário