Answered by:
Writing Custom send PipeLine

Question
-
Hi,
I'm just getting started with BizTalk and have come across a situation I can't find much clear documentation on:
I'm making an orchestration that is meant to take in a message containing data, generate a Excel based on that dataI have a .NET component that can generate an Excel,
I am able to pass the resulting Excel data back to BizTalk in form of XML Message:
Expression shape inside message assignment shape:
ExcelMessage = ExcelGenerator.GenerateExcel(DataMessage);
All well and good, but now I want to write the content of the ExcelMessage out to a file using a send pipeline.Any idea how I can do this, I found that writing custom pipeline is one way.
Do I need to write pipeline for Assembler Component?
Can anyone provide sample for Send Custom pipeline or any kind of documentation about custom send pipeline specially to deal with excel.
Thanks,
Jay
Sunday, March 28, 2010 7:30 AM
Answers
-
Hi Jay,
What can help you build a custom pipeline component is the pipeline component wizard. Sample can be found for instance in EAI solution from SDK, you can find when you installed BizTalk. Then there are several blog posts around pipelines:
3) http://www.codeproject.com/KB/biztalk/Biztalk_Custom_Pipeline.aspx
4) http://www.fpoint.com/biztalk/default.aspx (FarPoint that deals with Excel, but that is a commercial solution)
6) http://www.objectsharp.com/blogs/matt/images/ODBCCustomPipe.zip
HTH
Regards,Steef-Jan Wiggers
MCTS BizTalk Server
http://soa-thoughts.blogspot.com/
If this answers your question please mark it accordingly
BizTalk- Marked as answer by Andrew_ZhuModerator Friday, April 2, 2010 5:53 AM
Sunday, March 28, 2010 9:28 AMModerator -
Here is the perfect sample for your requirements. You have to create an assembler component and promote custom properties in the context. As you have an xml document with no schema in BizTalk you cannot promote the properties and change the msg context propery values.
http://www.codeproject.com/KB/biztalk/BTS_Pipeline_Component.aspx
The code in the execute method of the assembler pipeline writes custom values in the message context.
outMsg.Context.Promote("MessageType",
"http://schemas.microsoft.com/BizTalk/2003/system-properties",
"Namespace#Root");
outMsg.Context.Promote("SchemaStrongName",
"http://schemas.microsoft.com/BizTalk/2003/system-properties",
"SchemaAssebly full name");
Abdul Rafay - MVP & MCTS BizTalk Server
blog: http://abdulrafaysbiztalk.wordpress.com/
Please mark this as answer if it helps.- Marked as answer by Andrew_ZhuModerator Friday, April 2, 2010 5:53 AM
Sunday, March 28, 2010 12:30 PM -
Hi Jay,
That is not entirly true. SDK samples deals with send pipeline as does this (http://www.codeproject.com/KB/biztalk/Biztalk_Custom_Pipeline.aspx). You can also look at Abdul's link (codeproject). Explanation of receive/send pipeline and how to develop stay similar in all links provided. Examine them well and you will be able to implement your solution.
Regards,
Steef-Jan Wiggers
MCTS BizTalk Server
http://soa-thoughts.blogspot.com/
If this answers your question please mark it accordingly
BizTalk- Marked as answer by Andrew_ZhuModerator Friday, April 2, 2010 5:53 AM
Sunday, March 28, 2010 3:50 PMModerator
All replies
-
Hi Jay,
What can help you build a custom pipeline component is the pipeline component wizard. Sample can be found for instance in EAI solution from SDK, you can find when you installed BizTalk. Then there are several blog posts around pipelines:
3) http://www.codeproject.com/KB/biztalk/Biztalk_Custom_Pipeline.aspx
4) http://www.fpoint.com/biztalk/default.aspx (FarPoint that deals with Excel, but that is a commercial solution)
6) http://www.objectsharp.com/blogs/matt/images/ODBCCustomPipe.zip
HTH
Regards,Steef-Jan Wiggers
MCTS BizTalk Server
http://soa-thoughts.blogspot.com/
If this answers your question please mark it accordingly
BizTalk- Marked as answer by Andrew_ZhuModerator Friday, April 2, 2010 5:53 AM
Sunday, March 28, 2010 9:28 AMModerator -
Hi Steef,
Thanks for ur reply.
The problem is All code/ Document are related with receive pipeline and i am looking for send pipeline.
Do you have something on specially send pipe line?
Thanks
Jay
Sunday, March 28, 2010 9:43 AM -
Here is the perfect sample for your requirements. You have to create an assembler component and promote custom properties in the context. As you have an xml document with no schema in BizTalk you cannot promote the properties and change the msg context propery values.
http://www.codeproject.com/KB/biztalk/BTS_Pipeline_Component.aspx
The code in the execute method of the assembler pipeline writes custom values in the message context.
outMsg.Context.Promote("MessageType",
"http://schemas.microsoft.com/BizTalk/2003/system-properties",
"Namespace#Root");
outMsg.Context.Promote("SchemaStrongName",
"http://schemas.microsoft.com/BizTalk/2003/system-properties",
"SchemaAssebly full name");
Abdul Rafay - MVP & MCTS BizTalk Server
blog: http://abdulrafaysbiztalk.wordpress.com/
Please mark this as answer if it helps.- Marked as answer by Andrew_ZhuModerator Friday, April 2, 2010 5:53 AM
Sunday, March 28, 2010 12:30 PM -
Hi Jay,
That is not entirly true. SDK samples deals with send pipeline as does this (http://www.codeproject.com/KB/biztalk/Biztalk_Custom_Pipeline.aspx). You can also look at Abdul's link (codeproject). Explanation of receive/send pipeline and how to develop stay similar in all links provided. Examine them well and you will be able to implement your solution.
Regards,
Steef-Jan Wiggers
MCTS BizTalk Server
http://soa-thoughts.blogspot.com/
If this answers your question please mark it accordingly
BizTalk- Marked as answer by Andrew_ZhuModerator Friday, April 2, 2010 5:53 AM
Sunday, March 28, 2010 3:50 PMModerator -
Hi Jay
If you have the excel formatted message then you can directly send it to send port. Use pass through send pipeline to do it.
If you want the logic to be executed in the send pipeline then my answer is you can do with a pipeline component of type any. I would suggest for going to pipeline component only if you have a generic code for generating excel or else you can do what you are doing now and use pass through pipeline. Are you facing any issues when doing this?
Monday, March 29, 2010 4:14 AM