0
votes

I have a send port that receives a document with a set of promoted context properties. The adapter on the send port is set as WCF-SQL, and have been configured to connect to the SQL server.

The only part missing is configuring the messages tab, so that the correct message is being sent to the database. Right now I simply have some hardcoded values along with the message itself:

<bizSaveDocument xmlns="http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo">
   <conversationID>547e0702-c0c8-4535-9ab0-fa52b2fdbdd0</conversationID>
  <dataType>OIO</dataType>
  <fromID></fromID>
  <toID></toID>
  <msgInfoExtension><![CDATA[<infoExt><fileInfo fileName="ublinvoice.xml" encoding="utf-8" /></infoExt>]]></msgInfoExtension>
  <msgBody><bts-msg-body xmlns="http://www.microsoft.com/schemas/bts2007" encoding="string"/></msgBody>
  <msgBodyBin></msgBodyBin>
</bizSaveDocument>

I'm unsure how to properly insert my promoted context properties into these elements. To give an idea of where I want to configure this XML, see the screenshow below:

enter image description here

I cannot use the body option, since I need to insert some promoted properties into the database. Looking at the MSDN there seems to be no explanation of how to accomplish this. See this link: https://docs.microsoft.com/en-us/biztalk/core/specifying-the-message-body-for-the-wcf-adapters

For the receiving message, I created a pipeline component which promoted the required properties and works fine.

Is this simply not possible in standard Biztalk? If not, I will need to create an additional pipeline component to handle the sending.

1
Well, hold on. This doesn't seem right at all. Can you list the steps of you expected process, like 1. 2. 3. I wouldn't do anything you've listed here, like the Messages tab. Yes, you can get Properties from Messages into an outbound Message, just not like this. - Johns-305

1 Answers

1
votes

Ah, ok, I see what you're doing....so....don't do it this way.

The best and essentially correct way to handle this is with a normal BizTalk flow with Maps and an Orchestration. Remember, there is nothing wrong with using an Orchestration, if someone is telling you to not use Orchestrations, they are, well, wrong.*

Basically, Map to you SQL Schema using temp values, then set them from the Context using Distinguished fields.

Don't ever bother with the Messages Tab, it's basically hiding code where it should never be.

If they still make you do it some other way, you need to tell your management that this will take you about twice as long to implement because you have to create a anti-pattern that replicates built in functionality.