Geeks With Blogs
Bill Osuch - Random geek notes

In an earlier post I showed you how to implement basic EDI batching, releasing the batch every time 3 messages were waiting. In the real world, you’re probably going to have some other criteria for releasing the batch; in our case a back-end system notifies BizTalk when all HIPAA 837 claims in a single file are ready to be sent.

The MSDN page for this process is actually very easy to follow, but I’ll summarize it here.

First, you’ll set up a new receive port and location to receive the trigger file. For this example, create a new folder (in the same location as the Input, Fabrikam and Contoso folders) called Trigger. Configure the receive port with a transport type of FILE, select BatchControlMessageRecvPipeline for the Receive pipeline.

Create a new .xml file and paste the xml information from the MSDN page above. You’ll need to modify it for your specific party, batch and agreement names; mine looks like this when finished:

<?xml version="1.0" encoding="utf-8"?>
<ControlMessage xmlns="http://SQLControlMessage.IssueSelect">
  <PAM_Control xmlns="http://SQLControlMessage.IssueSelect">
    <DestinationParty></DestinationParty>
    <EdiMessageType>0</EdiMessageType>
    <ActionType>EdiBatchOverride</ActionType>
    <ActionDateTime>2012-02-02T14:30:00.000</ActionDateTime>
    <UsedOnce>0</UsedOnce>
    <BatchId>4</BatchId>
    <BatchName>Invoices for Contoso</BatchName>
    <DestinationPartyName>Contoso</DestinationPartyName>
    <SenderPartyName>ANCILLARY CARE SERVICES, INC.</SenderPartyName>
    <AgreementName>Contoso Purchase Order</AgreementName>
    <ReceiverPartyNameType>Contoso</ReceiverPartyNameType>
    <ToBeBatched>1</ToBeBatched>
  </PAM_Control>
</ControlMessage>

(Note that the DestinationParty node can be empty.)

Finally, open up the party agreement, go to the <your party> –> Contoso tab, and click Batch Configuration. Stop the batch if necessary, and in the release section, switch from Maximum number of transaction sets to External release trigger. Click Apply, then start the batch. Restart the host instance.

To test, drop 4 copies of Contoso’s xml purchase order file to the input directory. Switch over to the Contoso folder (or wherever you have their send port pointed to) and you shouldn’t see any output yet. Remember, you had originally configured it to batch after only 3 messages. Now, drop the trigger xml file to the Trigger directory you just created, and you should see a new batch message dropped. Open it and it should have 4 individual ST/SE sections, each with the appropriate data.

Technorati Tags: ,

Posted on Monday, February 27, 2012 3:04 PM BizTalk , EDI | Back to top


Comments on this post: BizTalk 2010 EDI batching–using an external release trigger

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Bill Osuch | Powered by: GeeksWithBlogs.net