[BizTalk advanced development skills] using ing an outgoing batch

Source: Internet
Author: User
Tags biztalk

To enable batch packaging of EDI X12 files in BizTalk, follow these steps:

1) Configure party's X12 Properties> party as interchange receiver> interchange batch creation settings

1.1 configure filter criteria

 

1.2 set release criteria"External release trigger"

1.3 Note: If a sendport needs to subscribe to the batch transaction set of the party, you must set the following subscription conditions:

EDI. destinationpartyname = myparta and
EDI. tobebatched = false

1.4 and start it.

2) for cyclic business data, for each transaction set generated by business data, use correlation set to upgrade the following attributes in Orchestration (twoProgramSet:

C: \ Program Files \ Microsoft BizTalk Server 2006 \ microsoft. BizTalk. EDI. baseartifacts. dll
C: \ Program Files \ Microsoft BizTalk Server 2006 \ microsoft. BizTalk. EDI. batchingorchestration. dll)

EDI. destinationpartyid = party's ID

EDI. tobebatched = true

EDI. encodingtype = 0/1-0 for EDI X12, 1 for EDI fact

Then, Direct Send To MessageBox, and finally try to [biztalkmgmtdb] to the table. [DBO]. [pam_control] Write a record (you can directly operate the dB to execute the insert statement, or use the updategrams of the SQL adapter to execute the insert Statement ). Why write such a data entry to the table [biztalkmgmtdb]. [DBO]. [pam_control?

Insert into [biztalkmgmtdb]. [DBO]. [pam_control]
([Destinationparty]
, [Edimessagetype]
, [Actiontype]
, [Actiondatetime]
, [Usedonce])
Values
(18

, 0 -- 0 for EDI X12, 1 for EDI fact
, 'Edibatchoverride'
, Getdate ()
, 0)

This is because Microsoft. biztalk. EDI. batchingorchestration. when receiving the following message, batchingservice assembles an edi xml message sent directly to MessageBox into a transaction set message that contains multiple values, and then sends the message to filesystem or FTP through edisend.

Pam Control Message:

<Controlmessage xmlns = "http://sqlcontrolmessage.issueselect"/>
<Pam_control>
<Destinationparty> 18 </destinationparty>
<Edimessagetype> 0 </edimessagetype>
<Actiontype> edibatchoverride </actiontype>
<Actiondatetime> [yyyy-mm-ddthh: mms. Sss] </actiondatetime>
<Usedonce> 0 </usedonce>
<Tobebatched> 1 </tobebatched>
</Pam_control>
</Controlmessage>

 

So how is this message sent to MessageBox? This process is as follows: the BizTalk EDI application has an SQL adapter-type receive location (batchcontrolmessagerecvloc). By default, it executes the Stored Procedure biztalkmgmtdb in 30 seconds. DBO. edi_getcontrolmessage: This stored procedure generates a controlmessage, which is then processed by batchcontrolmessagerecvpipeline, then enters MessageBox, And then Microsoft in BizTalk EDI application. biztalk. EDI. routingorchestration. batchroutingservice and Microsoft. biztalk. EDI. batchingorchestration. the batchingservice receives the batchcontr The corresponding routing and packaging will be performed after the olmessage. It processes multiple edi xml into an EDI message with IAS, GS, and other header information, then, you can use the sendport of edisend pipeline to process this EDI message into X12 and send it to filesystem or FTP. The sendport must use the following subscription conditions:

EDI. destinationpartyname = myparta and
EDI. tobebatched = false

If you want to receive this batch EDI message from multiple parties, you can set multiple groups of such subscription conditions!

 

References: (1) http://msdn.microsoft.com/en-us/library/bb226357 (bts.20). aspx

(2) http://blog.biztalk-info.com/archive/2009/01/29/BizTalk_2006_R2_X12_EDI_Batching.aspx

(3) http://www.biztalkgurus.com/blogs/biztalksyn/archive/2009/05/15/outbound-edi-batching-tutorial.aspx

Thanks for your reading! This is just my learning note.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.