Thursday, January 30, 2014

Shareing BizTalk Applications artifacts.  Especially pipeline.  When I go to redeploy I get the following error.

   

The DELETE statement conflicted with the REFERENCE constraint
"adm_ReceiveLocation_fk_Pipeline". The conflict occurred in database
"BizTalkMgmtDb", table "dbo.adm_ReceiveLocation", column
'ReceivePipelineId'.
The statement has been terminated."

To fix this you can delete and the associated BizTalk applications.  Load the MSI and then reload the other applications.   I will copy the needed artifacts , in the other application and give them a different name.















Friday, December 14, 2012

C# expand(Resize) array for a class

Imagine you had one class connected after another.  This one happens to be the EDI 271...

Difficult to read, however lets continue:


<>
  XmlSerializer SerializerObj = new XmlSerializer(typeof(X12_00501_271));
            XmlNodeReader reader = new XmlNodeReader(this.Utilities.ReturnDocument);
            object obj = SerializerObj.Deserialize(reader);
            X12_00501_271 Cmyobj = (X12_00501_271)obj;
                     
            int lenTS271_2000A_Loop = Cmyobj.TS271_2000A_Loop.Length;
            for (int i = 0; i < lenTS271_2000A_Loop; i++)
            {
                int lenTS271_2000B_Loop = Cmyobj.TS271_2000A_Loop[i].TS271_2000B_Loop.Length;
                for (int j = 0; j < lenTS271_2000B_Loop; j++)
                {
                    int lenTS271_2000C_Loop = Cmyobj.TS271_2000A_Loop[i].TS271_2000B_Loop[j].TS271_2000C_Loop.Length;
                    for (int k = 0; k < lenTS271_2000C_Loop; k++)
                    {
                        int lenTS271_2110C_Loop = Cmyobj.TS271_2000A_Loop[i].TS271_2000B_Loop[j].TS271_2000C_Loop[k].TS271_2100C_Loop.TS271_2110C_Loop.Length;
                        // start
1)                        TS271_2110C_Loop[] TS271_2110C_Loop = Cmyobj.TS271_2000A_Loop[i].TS271_2000B_Loop[j].TS271_2000C_Loop[k].TS271_2100C_Loop.TS271_2110C_Loop;
 2)                       Array.Resize(ref TS271_2110C_Loop, TS271_2110C_Loop.Length + 1);
                        TS271_2110C_Loop[TS271_2110C_Loop.Length - 1] = new TS271_2110C_Loop();

                        3) Cmyobj.TS271_2000A_Loop[i].TS271_2000B_Loop[j].TS271_2000C_Loop[k].TS271_2100C_Loop.TS271_2110C_Loop = TS271_2110C_Loop;

    

<>

1.  Instantiate new copy of the class TS271_2110C_Loop.
2.  Use the resize command to expand the table. 
3.  Load the class  TS271_2110C_Loop back into the original oject:

 Cmyobj.TS271_2000A_Loop[i].TS271_2000B_Loop[j].TS271_2000C_Loop[k].TS271_2100C_Loop.TS271_2110C_Loop = TS271_2110C_Loop;

 

Tuesday, January 10, 2012

BizTalk 2010 Batch Configuration process in Agreement

Using Batching in agreement in BizTalk 2010. The batch logic seem clear enough.

1. The receive location and Receive port cannot have a orchestration in the middle. I could not get it to work.
2. I droped the debatched files to a folder.
3. The receive location read the folder with using the EdIReceive pipeline.
4. Nothing special about the Receive Port.
5. The Batch Configuration" tab was configured in the agreement, on the batch configuration tab. Give it a batch name, you can filter your send port with the batch name. select Start immediatly. To a proof of concept I selected maximium number of transactions. Interchange and 2.
6. On the filter I used:
BTS.ReceivePortName == BatchTest
This is the name of the receive port.
7. Pressing the "Start" button(about 5 lines down on the Batch configuration tab) lanches a orchestration that does the work. You can see the orchestration on the group hub.
8. Create a send port.
9. Do not put the send port in the send port tab of the agreement.
10 The send port will have a filter.

You could put many things in the filter but you need:

EDI.ToBeBatched == False

other filter items to restrict criteria as needed.

Three tricks here:
1. Use a receive and send port with nothing in the middle.
2. Do not put your send port name in the send port tabs of your agreement.
3. Use the EDI.ToBeBatched == False as one of the send port filters to transport your batched file.

Problems:

1. If the orchestration is not running and you drop files, it errors nicely in the group hub.
2. The batch process may pick up multiple EDI types like your 997 or 999 if you are not careful.

Good luck.

Friday, August 12, 2011

Biztalk and SSO reinstall

When you delete the SSO data base it will be removed from the SQL manager. But real data files (MDF I think) are still there. Go delete thos files and you SSO reinstall might work.


Good luck
Kent Seattle

C# dll in orchestration and corrupt data


BizTalk 2010 EDI
When you drop one transaction it looks good when you drop many the data is corrupt.
If you use c# and static variables or methods. It works fine with one transaction, but when you post many transactions the static variables occur once. The data is not isolated and you en up with a mess.

You need to write the DLL with one class and do not use static variables or Methods.

Been a while since I posted

Wednesday, April 20, 2011

BizTalk 2010 BTSNTSvc.exe.config From BT 2009

If you are movning your old BTSNTSvc.exe.config file to BizTalk 2010. You might need to add


startup useLegacyV2RuntimeActivationPolicy="true"
supportedRuntime version="v4.0" /
/startup

(Had to remove < > tags to post)

If not you may get an error like:


A message received by adapter "FILE" on receive location "TestFromBlue" with URI "C:\BXArchive\Inbound\FromBlue\*.*" is suspended.
Error details: An output message of the component "Unknown " in receive pipeline "Microsoft.BizTalk.Edi.DefaultPipelines.EdiReceive, Microsoft.BizTalk.Edi.EdiPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" is suspended due to the following error:
Error encountered during parsing. The X12 transaction set with id '' contained in functional group with id '924554', in interchange with id '000924621', with sender id '993 ', receiver id '933 ' is being suspended with following errors:
Error: 1 (Miscellaneous error)
6: The document specification from assembly failed to load. Verify the schema for this document specification is deployed and is in the Global Assembly Cache.
.
The sequence number of the suspended message is 1.
MessageId: {DF0A3BA6-7223-4FD5-85A3-9873FE4F9E7D}
InstanceID: {B597C4DF-788F-41EC-84E4-190BD4830742}

Wednesday, July 7, 2010

BizTalk repeating source data view concurrently

Do you have multiple source data segments you wish to view concurrently?
Use the Cumulative Concatenate functoid. The trick is the second parameter. It is a number usually 2. This number tells the node (above the data) that you concatenate. So you do want get everything in the file.

1. Make sure to use a looping functoid on the node above your data. The node should have min 0 and max “*” or a value such as 99. This means it is a loop.
2. I use a script functoid before the Cumulative Concatenate functoid to add a delimiter to my array.
3. I used an iteration functoid and an equal function to suppress the extra records. Attach the equal to the target node you wish to suppress.
4. I loaded the concatenated data to a script functoid with other fields to calculate the results.

I wish I could post a picture here!!!