Posts Tagged ‘Pipeline’

Two months ago I published on CodePlex and at Microsoft Code Gallery the pipeline component “Multi-part Message Attachments Zipper Pipeline Component” for BizTalk Server2010. This time I decided to make available a version of this component for previous version of BizTalk Server.

The BizTalk Multi-Part Message Attachments Zipper is a pipeline component for BizTalk Server 2006/2006 R2/2009 which can be used in a send pipeline and is intended to replace all attachments of a multi-part message for its zipped equivalent.

The capabilities are similar to those available in compression software such as WinZip or 7-zip:

  • Attachments Compression – Extracts, in a send pipeline, all message parts include in a multi-part message that are not included in the message body (Message Body Part = False), compresses it and attaches the compressed attachment back to the message.
  • No compression/decompression software needs to be installed in the BizTalk Server.

How to install the pipeline component?

To use this pipeline component in your projects just copy the “PipelineComponentMultipartMsgZipAttach.dll” file into “Pipeline Components” folder that exists in BizTalk Server installation directory: “..\Program Files\Microsoft BizTalk Server VERSION\Pipeline Components”.

Requirements

The Multipart Message Attachments Zipper will work with:

  • BizTalk Server 2006, BizTalk Server 2006 R2 or BizTalk Server 2009
  • .NET Framework 2.0
  • No compression/decompression software needs to be installed in the BizTalk Server.

The pipeline component can be found and download on Microsoft Code Gallery:
Multi-Part Message Attachments Zipper Pipeline Component for BizTalk 2006/2009 (423.7 KB)
Microsoft Code Gallery

In my last two posts I showed two possible errors, and their respective solutions, that can happen when we are validating dummy EDI message, provided by our partners, against the schema using Visual Studio, but these errors could also happen in runtime.

In this post I will show you one common error when we are validating an EDI solution.

After I deploy and correctly configured the solution, I was trying to receive an EDI document from a Receive Port, in order to convert it to XML format using the generic EDI pipeline: “Microsoft.BizTalk.Edi.DefaultPipelines.EdiReceive”, but I was always getting this error:

“There was a failure executing the receive pipeline:
“Microsoft.BizTalk.Edi.DefaultPipelines.EdiReceive,
Microsoft.BizTalk.Edi.EdiPipelines, Version=3.0.1.0, Culture=neutral,
PublicKeyToken1bf3856ad364e35” Source: “EDI disassembler” Receive Port: “IN_ORDER_PORT” URI: “E:\PORTS\EDI\IN_ORDER\*.*” Reason: No Disassemble stage components can recognize the data.“.

The message provided by our partner was this:

UNH+1000100+ORDERS:D:93A:UN:EAN007'
BGM+220+01521710'
DTM+137:120530:101'
DTM+64:120604:101'
DTM+63:120004:101'
FTX+AAI+++SOME TEXT'
FTX+AAI+++SOME TEXT'
FTX+AAI+++SOME TEXT'
NAD+BY+8000000001164::9'
NAD+DP+8000000009463::9'
NAD+IV+8000000013002::9'
NAD+SU+8000001459008::9'
NAD+PR+8000000016003::9'
LIN+1++4001518722937:EN'
PIA+1+00:PV+14001518722937:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:52'
LIN+2++5000014010034:EN'
PIA+1+00:PV+15701014010031:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:152'
LIN+3++5000014016142:EN'
PIA+1+00:PV+15701014016149:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:304'
LIN+4++5006879009752:EN'
PIA+1+00:PV+15776879009759:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:720'
UNS+S'
UNT+31+1000100'

CAUSE

After some time trying to understand the reason of this problem, I realize that’s nothing wrong with my project, the problem is actually in the message that I’m using.

This error occurs because the message does not contain the EDIFACT interchange envelope segments (UNB and UNZ). An EDIFACT interchange begins with a UNB. It contains version release information, syntax information, and partner information. An interchange ends with a UNZ.

UNA Segment: The UNA segment is optional in an EDIFACT interchange. The specifications in the UNA segment define the characters used as separators and indicators for the interchange. Use this segment only if the interchange contains non-standard separator characters. (More information here)

UNB Segment: The UNB segment is compulsory to an EDIFACT interchange. This segment acts as the interchange header for a set of EDIFACT documents. The UNB segment elements identify the sender and recipient of the interchange, together with the date and time that the interchange was prepared and the agency controlling the syntax of the interchange. (More information here)

UNZ Segment: This segment is the Interchange Trailer segment of an EDIFACT document. This segment indicates the end of an interchange and checks the interchange reference and number of documents in the interchange. (More information here)

SOLUTION

Add this segment to your message: UNA (optional), UNB and UNZ and the message will be processed correctly.

Correct message:

UNA:+,?*'
UNB+UNOB:1+UNB2.1+UNB3.1+012301:0123+UNB5'
UNH+1000100+ORDERS:D:93A:UN:EAN007'
BGM+220+01521710'
DTM+137:120530:101'
DTM+64:120604:101'
DTM+63:120004:101'
FTX+AAI+++SOME TEXT'
FTX+AAI+++SOME TEXT'
FTX+AAI+++SOME TEXT'
NAD+BY+8000000001164::9'
NAD+DP+8000000009463::9'
NAD+IV+8000000013002::9'
NAD+SU+8000001459008::9'
NAD+PR+8000000016003::9'
LIN+1++4001518722937:EN'
PIA+1+00:PV+14001518722937:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:52'
LIN+2++5000014010034:EN'
PIA+1+00:PV+15701014010031:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:152'
LIN+3++5000014016142:EN'
PIA+1+00:PV+15701014016149:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:304'
LIN+4++5006879009752:EN'
PIA+1+00:PV+15776879009759:EN'
IMD+F+M+:::SOME DESCRIPTION'
QTY+21:720'
UNS+S'
UNT+31+1000100'
UNZ+1+UNB5'

In the last months I have been working on some personal projects that are finally gaining life. One of them, I’ve already had the pleasure to announce here on my blog: New version of BizTalk Scheduled Task Adapter is now available on CodePlex.

And this is my last one!

BizTalk Multi-part Message Attachments Zipper Pipeline Component is a pipeline component for BizTalk Server 2010 which can be used in a send pipeline and is intended to replace all attachments of a multi-part message for its zipped equivalent.

BizTalk-Multi-part-Message-Attachments-Zipper-Pipeline-Component

The capabilities are similar to those available in compression software such as WinZip or 7-zip:

  • Attachments Compression – Extracts, in a send pipeline, all message parts include in a multi-part message that are not included in the message body (Message Body Part = False), compresses it and attaches the compressed attachment back to the message.

Requirements

The Multi-part Message Attachments Zipper will work with:

  • BizTalk Server 2010
  • .NET Framework 4.0

No compression/decompression software needs to be installed in the BizTalk Server.
BizTalk Multi-part Message Attachments Zipper Pipeline Component (65.6 KB)
Microsoft Code Gallery

or on CodePlex: BizTalk Multi-part Message Attachments Zipper Pipeline Component

Recently after installing a new version of one BizTalk Application, in order to provide a new service and after having validated all the normal steps of an installation:

  • Check the correctly installation (in BizTalk Management Console and in the Global Assembly Cache (GAC))
  • Correctly Application Binding
  • Restart Host instances

I keep getting this error:

There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Receive Port: "IN_PORT" URI: "/MyService.WS/WebService_Provisioning.asmx" Reason: The document specification <Project.Schemas.MyRequest> from assembly <Project, Version=1.0.0.0, Culture=neutral, PublicKeyToken=776eb620b83c3d30> failed to load. Verify the schema for this document specification is deployed and is in the Global Assembly Cache.

CAUSE

This error can happen for several reasons!!

  • Your DLL was not correctly installed (not installed or missing from GAC).
  • Misunderstanding in framework version that you used.
  • Forgetting to restart services so that it reflects the new changes

SOLUTION

Because this error can happen for several reasons you may have many solutions to this problem. These are some steps that you should take to resolve the issue:

  • Verify if the Assembly is correctly deployed (check if your DLL is in the BizTalk Management Console and in the Global Assembly Cache (GAC)). If the assembly was not found, you need to redeploy correctly the BizTalk Project or run gacutil to install the DLL in GAC.
  • Verify if the Application Pool (in case of Service) is running and correctly configured.
  • Verify the .NET Framework version of the Application Pool. If the application pool is running .NET Framework 2.0 and BizTalk solution is using other version of .NET Framework, at runtime it will not find the Assembly in GAC (.NET Framework version needs to be consistent.). In this case you need to change the .NET Framework version used in the BizTalk projects or change the Framework used in the App Pool.
  • Restart host instances

However, there is another step which usually is not referenced!

If you are using a Request-Response Port, normally using WCF or SOAP adapter, making restart only to Host Instances is not enough. This type of port is running over BizTalkServerIsolatedHost so you need to also restart App Pool associated with your services.

Tags: BizTalk | Pipeline | Errors and Warnings, Causes and Solutions

Normally we can debug almost all pipeline components in run-time mode by attaching Visual Studio to “BTSNTSvc.exe” process (see: Debugging External assembly’s or pipeline components – Attach to Process – which BizTalk process to use?)

This is true for components that is running on In-Process Host, the exception is: Custom Pipeline Components that are running on Isolated Host.

One of the differences between Isolated Host and In-Process Host is that an Isolated Host must run under another process, in most case IIS, and an In-Process host is a complete BizTalk service alone.

So, if you are using custom pipelines that are associated, for example with HTTP, SOAP or WCF Adapter, then you need to attach to the proper isolated host process, in this case “w3wp.exe” process.

Note:

The application pool process (w3wp.exe) is typically not started until the first request is received.

You can use a browser to access the receive location URL, this should return a WSDL and should cause the “w3wp.exe” process to initiate.

Related articles:

Special thanks

One of the pleasures of trying to help other people’s is that sometimes you learn some things, and this is one of these cases , thanks Ritesh.

Tags: BizTalk | Pipeline | Components | Debug

When building BizTalk Project it gives the following error:

Unable to copy file "…\Pipeline Components\MyPipelineComponent.dll" to "bin\Debug\ MyPipelineComponent.dll". The process cannot access the file "bin\Debug\ MyPipelineComponent.dll" because it is being used by another process

More details in MSDN Forum, Thread Title: custom pipeline error

In the past I posted an article regarding to a similar problem:

CAUSE

  • Visual Studio has a lock on the file in order to show the pipeline components in the toolbox.

Or

  • Some BizTalk process is running BizTalk host and have a lock on the file

These two errors have basically the same solution, and to solve them, you can try two approaches:

SOLUTION 1

  • Close Visual Studio and restart host instance to make sure the pipeline component
    DLL get released.
  • And then deploy pipeline component.

SOLUTION 2

  • Rename file (it is much faster).
  • Restart host instance
  • Deploy pipeline component
  • And then delete old DLL’s

Tags: BizTalk | Pipeline | Deploy | Errors and Warnings, Causes and Solutions

This problem occurs many times when we are trying to deploy pipeline components (copy dll to folder: “C:\Program Files\Microsoft BizTalk Server …\Pipeline Components”.

“cannot copy "custom pipeline component" as the earlier is in use”

CAUSE

  • Visual Studio has a lock on the file in order to show the pipeline components in the toolbox.

Or

  • Some BizTalk process is running BizTalk host and have a lock on the file

SOLUTION 1

  • Close Visual Studio and restart host instance to make sure the pipeline component dll get released.
  • And then deploy pipeline component.

SOLUTION 2

  • Rename file (it is much faster).
  • Restart host instance
  • Deploy pipeline component
  • And then delete old dlls

Tags: BizTalk | Pipeline | Deploy | Errors and Warnings, Causes and Solutions

For no reason, one of my BizTalk 2006 R2 Lab environment begin to appear the following error:

“message sent to adapter “FILE” on send port “SEND_EDI_INVOICE: FILE” with URI “C:\Projects\ Ports\OUT_EDI_INVOIC\%MessageID%_%SourceFileName%” is suspended.
Error details: There was a failure executing the send pipeline: “EDISendSMimeEncode, Version=1.0.0.10, Culture=neutral, PublicKeyToken=4dbf1ba6edc1a1f4” Source: “MIME/SMIME encoder” Send Port: “SEND_EDI_INVOICE_FILE” URI: “C:\Projects\Ports\OUT_EDI_INVOIC\%MessageID%_%SourceFileName%” Reason: Unable to initialize.
Please ensure that exsmime.dll has been registered in the system.

This is a strange behavior occurs in a custom pipeline that uses MIM/SMIME encoder. The solution that I found to solved the problem was the solution 1

SOLUTION 1

  • Open the command prompt.
  • cd C:\Program Files\Microsoft BizTalk Server …\
  • and execute the following command:
    regsvr32 exsmime.dll
    

So I started looking for my “exsmime.dll” file in my BizTalk environment and to my surprise there was no! yeh… But I found a file backup of that file in this directory with the name: “ExsmimeBak.dll”, so I try solution 2 and it solved my problem Smile

SOLUTION 2

  • Open the command prompt.
  • cd C:\Program Files\Microsoft BizTalk Server …\
  • and execute the following command:
    regsvr32 ExsmimeBak.dll
    

Tags: BizTalk | Pipeline | Certificates | Errors and Warnings, Causes and Solutions

Recently I tried to install an old BizTalk pipeline component project to a new environment, but it fails giving the following error:

“The specified module could not be found. (Exception from HRESULT: 0x8007007E)”

CAUSE

  • Your DLL (component) depend on other DLL’s to get its job done and if you didn’t copy or install those too, you’d indeed get this error message.

Because this was an old project, the difficulty was to know all the dependencies.

SOLUTION

  • You need to figure out what dependencies are referenced (directly or indirectly) by the component, so try to use one of this tools: DependencyWalker, FileMon or ProcessMonito. And find out what the dependencies that are missing.
  • Copy the missing dependencies to the folder “C:\Program Files\Microsoft BizTalk Server 2006\Pipeline Components” or install them in GAC


Tags: BizTalk | Pipeline | Errors and Warnings, Causes and Solutions

While trying to debug custom pipeline component using “Pipeline.exe” utility, I keep getting the following error message:

Pipeline file name is already specified
Error 80131600

First of all, to use Pipeline utility to debug custom components you have to edit the properties of you pipeline component project:

  • Select you pipeline component project
  • Right click, and select the option “Properties”.
  • Select the tag Debug
    • In “Start Action”, select the option “Start external program” and select the Pipeline.exe utility
      • Common path: C:\Program Files\Microsoft BizTalk Server 2006\SDK\Utilities\PipelineToolsPipeline.exe
    • In “Start Options” you have to set the “Command line arguments” option:
      • “path to your pipeline.btp” –d “path to your message” –c

CAUSE

  • The path I was specifying to my.btp file wasn’t in quotes and spaces in the path were causing the problem
  • This apply also to the path of my message.

SOLUTION

  • Put the path with quotes, my sample:
    • “C:\Development\MyProject\MyPipelines\MyReceivePipeline.btp” -d “C:\Development\MyProjec\Samples\MY_Message.txt” -c

Tags: BizTalk | Pipeline | Components | Debug | Errors and Warnings, Causes and Solutions