Answered by:
Dynamically Set Properties of a Pipeline component

Question
-
Hi, I have a custom pipeline component which Encrypts, ZIPs and password protects a message prior to emailing. I have a requirement to dynamically set the password from the orchestration. I can't find any examples on how to do this although I see that there is BTS.SendPipelineConfig. I presume I pass the altered config to this, but I don't know how to access the existing xml config for the pipeline.
Are there any tutorials or examples avaiable for this? I have searcvhed to no avail. Thanks.
Monday, May 14, 2012 12:54 PM
Answers
-
Thanks for all the feedback people I have, after reflection, decided to write the code within the pipeline as I had already written a custom component. This is a shame because I wanted to keep the component generic but it also seems the most sensible way to move forward.
- Marked as answer by RedEyedMonster Tuesday, May 15, 2012 8:10 AM
Tuesday, May 15, 2012 8:10 AM
All replies
-
I would read password from custom pipeline component.
Password would be either stored in BizTalk config file or SSO DB (more secure solution).
You may use message context property to dynamically set the password from the orchestration, but not sure this is a "best practice".
Christophe BRANDO...If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.
- Edited by Christophe BRANDO Monday, May 14, 2012 1:04 PM
Monday, May 14, 2012 1:02 PM -
You can try setting the password in BizTalk Orchestration and write a custom context property , attach with the message which is going to your pipeline , and in the pipeline you can read that context property. However in this case if the message gets suspended the password will be available in BizTalk admin console.
To avoid this you can encrypt the password property and decrypt again in the pipeline code.
HTH,
Naushad Alam
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
alamnaushad.wordpress.com
My new TechNet Wiki "BizTalk Server: Performance Tuning & Optimization"Monday, May 14, 2012 1:08 PMModerator -
Hi,
Using SSO DB will be a secure option with less dev effort. You can use the SPI to get the password from the SSO DB in the custom pipeline as mentioned by Christophe. I would avoid setting in message context as that would be in clear text on the admin console.
Regards,
Bali
MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
My Blog:dpsbali-biztalkweblog
-----------------------------------------------------
Mark As Answer or Vote As Helpful if this helps.- Proposed as answer by Abhijit Mahato Monday, May 14, 2012 1:23 PM
Monday, May 14, 2012 1:19 PM -
Sorry I was not clear the password needs to be dynamically created and set from the orchestration i.e. everytime the process runs the password changes.Monday, May 14, 2012 3:22 PM
-
but I need to create the password dynamically as well as set it, so storing in the SSO is no good unfortunately. We already use that for the majority of our configuration.Monday, May 14, 2012 3:24 PM
-
Hi, I have a custom pipeline component which Encrypts, ZIPs and password protects a message prior to emailing. I have a requirement to dynamically set the password from the orchestration. I can't find any examples on how to do this although I see that there is BTS.SendPipelineConfig. I presume I pass the altered config to this, but I don't know how to access the existing xml config for the pipeline.
Are there any tutorials or examples avaiable for this? I have searcvhed to no avail. Thanks.
I think you are already going in right direction and most probably have created a pipeline component exposing the property to specify the password as this password is getting changed each time so all you need to do is to change the pipeline configuration at runtime. You can do it as shown in these blogs:
Dynamically Configuring Pipeline Component Properties in a BizTalk Orchestration
Applying Per-Instance Pipeline Configuration at Runtime
Please mark the post answered your question as answer, and mark other helpful posts as helpful, it'll help other users who are visiting your thread for the similar problem, Regards -Rohit Sharma (http://rohitt-sharma.blogspot.com/)
Tuesday, May 15, 2012 6:12 AMModerator -
Sorry I was not clear the password needs to be dynamically created and set from the orchestration i.e. everytime the process runs the password changes.
How do you create the password, if its from data in the message then you can do this completely in the pipeline component. If you can do that you would not need to set the password in the message context there by risking exposure.
Regards,
Bali
MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
My Blog:dpsbali-biztalkweblog
-----------------------------------------------------
Mark As Answer or Vote As Helpful if this helps.- Edited by DPS Bali Tuesday, May 15, 2012 6:16 AM
Tuesday, May 15, 2012 6:16 AM -
Thanks for all the feedback people I have, after reflection, decided to write the code within the pipeline as I had already written a custom component. This is a shame because I wanted to keep the component generic but it also seems the most sensible way to move forward.
- Marked as answer by RedEyedMonster Tuesday, May 15, 2012 8:10 AM
Tuesday, May 15, 2012 8:10 AM