none
BizTalk DB2 adapter Port Type and message subscribing RRS feed

  • Question

  • I’m having a BizTalk 2010 problem in understanding how to subscribe to a message in the message box that is created by a scheduled process run from an application on the server that contains a receive location where the transport type is set to DB2.

     

    The DB2 transport property SQL command is set to a simple select query. The schedule for the port has been set and the results returned are seen in the message box. This message shows the following error information:

     

    The published message could not be routed because no subscribers were found. This error occurs if the subscribing orchestration or send port has not been enlisted, or if some of the message properties necessary for subscription evaluation have not been promoted. Please use the Biztalk Administration console to troubleshoot this failure.

     

    Knowing the promoted ReceivePortName for this message, I tried to subscribe to it in an orchestration in another application on the same BizTalk server.

     

    This orchestration contains a one-way receive port with binding set to Direct and Partner Orchestration Port set to Message Box. A receive shape was added and has the following properties.

     

    Activate: True

    Filter Expression: BTS.ReceivePortName == “rcvPort_DB2_Select_01”

    Message: msgSelect_01  

     

    The msgSelect_01 is shown under Messages in the orchestration view and has a Message Type that was selected from the Multi-part Message Types and has parameters Message Part Type set to a schema that matches the returned parameters from the DB2 select query.

     

    The orchestrations continues with a Construct Message shape containing a Transform and ultimately to a Send shape and send port.

     

    The Filter Expression is not subscribing to the message in the message box. Can anyone give help here. Thanks.
    Wednesday, January 4, 2012 6:44 PM

Answers

  • Hi,

    Ensure you have a schema deployed with namespace 'http://rcvDB2_Law01' and rootnode 'BIZTTALK_DB2'.
    And just use the default XMLReceive pipeline, without modifications

    Regards,

    René.

    • Marked as answer by bsyren Monday, January 9, 2012 7:40 PM
    Monday, January 9, 2012 7:09 PM

All replies

  • Hi,

    Are you using any pipeline in the ReceievPort?

    Did you check if the Orchestrations activation subscription against the promoted properties of the suspended message?

    Regards,

    René

    Wednesday, January 4, 2012 8:12 PM
  • No pipeline is used in a receive port. Think of it in this way. Application A has a Receive Location with a transport type of DB2. DB2 is an adapter added to the adapters list under Platform Settings in BTS. When a receive port is added to application A and DB2 is selected, a wizard runs that collects information for a connection string to DB2. During this wizard, you define your query. The receive location for the receive port is scheduled to run each day. This creates the message in the message box. The message contains the results of the query.

     

    Application B needs to subscribe to this message. I believe it is the way I’m constructing the filter expression in the receive shape properties.

     

    I can successfully use this same filter to subscribe to the message from a BTS send port in application B but I must understand how to do this from within a receive shape in an orchestration as I need to manipulate the message content before it reaches a send port in BTS.

    Thursday, January 5, 2012 12:41 PM
  • Hi,

    I think the Orchestration's filter includes the messagetype and since you're not using a receivepipeline the messagetype is not promoted. So the subscription is not met.

    Regards,

    René

    Thursday, January 5, 2012 12:57 PM
  • Since a pipeline is not involved with the receive port but involves a DB2 adapter instead, the promoted properties of the message in the message box are as follows:

     

    InboundTransportLocation   DB2://xxx.xxx.xxx.xxx:xxxx/SBSD:Select02   Promoted     http://schemas.microsoft.com/BizTalk/2003/system-properties

    ReceivePortName                 rcvPort_DB2_Law_Select02           Promoted     http://schemas.microsoft.com/BizTalk/2003/system-properties

    InboundTransportType         DB2                                     Promoted     http://schemas.microsoft.com/BizTalk/2003/system-properties

    ReceivePortID                   {997C9756-A74B-452C-880B-78ED77C0A05D}     Promoted     http://schemas.microsoft.com/BizTalk/2003/system-properties

     

    I have tried the following filters in the receive shape of the orchestration but none work.

     

    BTS.ReceivePortName == “rcvPort_DB2_Select_01”

    BTS.InboundTransportLocation == “DB2://xxx.xxx.xxx.xxx:xxxx/SBSD:Select02

    BTS.InboundTransportType == “DB2”

     

    Thursday, January 5, 2012 4:10 PM
  • Hi,

    Please have a look at the subscriptions in the administration console and look for the subscription of your orchestration, it will probably contain the messagetype also.

    Have you tried using an XMLReceive pipeline in the receivelocation?

    Regards,

    René

    Thursday, January 5, 2012 4:26 PM
  • Yes, I’ve tried the XMLReceive option for the Receive pipeline but I receive the following error so I’m using PassThruReceive as this results in a message containing the query results. That said, this error message is telling me it wants a schema but I’m unsure how to tell it to use the schema that was generated by the wizard when the DB2 receive port was constructed.

     

    A message received by adapter "DB2" on receive location "rcvLoc_DB2_Law_Select02" with URI "DB2://129.***.**.**:****/SBSD:Select02" is suspended.

     Error details: 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: "rcvPort_DB2_Law_Select02" URI: "DB2://129.***.**.**:****/SBSD:Select02" Reason: Finding the document specification by message type "http://LawSelect02#DB2Root" failed. Verify the schema deployed properly.  

     MessageId:  {27C208E1-3B7F-4713-B6BB-3CFA640D104F}

     InstanceID: {A2E61A58-1E44-49EB-AA1C-5C9F391FC59E}

     

    So, in XMLReceive configure Pipeline, I set AllowUnrecognizedMessage to True and RecoverableInterchangeProcessing to True and received the following error.

     

    A message received by adapter "DB2" on receive location "rcvLoc_DB2_Law_Select02" with URI "DB2://129.***.**.**:****/SBSD:Select02" is suspended.

     Error details: The output message of the receive pipeline "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" failed routing because there is no subscribing orchestration or send port.

     The sequence number of the suspended message is 1. 

     MessageId:  {F1576CD8-21F3-4588-9FF3-3AD2744053F6}

     InstanceID: {74EEED0C-2E1E-495F-98F1-528285084E34}

     

    This leaves DocumentSpecNames and EnvelopeNames settings and I’m unsure how they might be set to resolve this error.

     

    As for subscriptions in the administration console, I find the following subscription.

     

    http://schemas.microsoft.com/BizTalk/2003/system-properties.InboundTransportType == DB2  And

    http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType == http://DB2Receive_Select_Law01#BIZTALK_DB2

     

    What's interesting is, I only have in the filter BTS.InboundTransportType == "DBS" not the MessageType displayed above which is incorrect, it should be
    BTS.MessageType == "http://LawSelect02#DB2Root"

    • Edited by bsyren Monday, January 9, 2012 6:03 PM
    Thursday, January 5, 2012 5:50 PM
  • From what I've read, one would select the XMLReceive as a pipeline if schema validation is wanted early on.

    I believe the problem lies with the added filter element

    http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType == http://DB2Receive_Select_Law01#BIZTALK_DB2

    being inserted into my filter when I deploy the application to BTS. This clearly changes the filter to be wrong. I added the correct filter but it still retained this added element as shown here:

    http://schemas.microsoft.com/BizTalk/2003/system-properties.InboundTransportType == DB2  And

    http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType == http://DB2Receive_Select_Law01#BIZTALK_DB2  And

    http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType == http://LawSelect02#DB2Root

    I believe this is why the filter fails to subscribe to the message when the pipeline is set to PassThruReceive. I’m unable to figure out how to remove this bogus filter element that is being inserted on deployment.

    I can only conclude this is a bug with BizTalk unless someone can indicate otherwise.

    Thursday, January 5, 2012 9:11 PM
  • Hi,

    The added filter element originates from the MessageType of the message you configured on the Receive shape in your orchestration.

    It is clear that the MessageType you receive on the ReceivePort, i.e. http://LawSelect02#DB2Root is not the same as you have configured on the receievshape, i.e. http://DB2Receive_Select_Law01#BIZTALK_DB2.

    You should make changes so that they are the same, you can even remove the extra filter on ReceivePort or location then.

    Regards,

    René

    Thursday, January 5, 2012 9:39 PM
  •  

     

     

    To configure bindings for an orchestration


    1. Click Start, click All Programs, click Microsoft BizTalk Server 2010, and then click BizTalk Server Administration.

    2. In the console tree, expand BizTalk Server Administration, expand the BizTalk group, expand Applications, and then expand the application containing the orchestration for which you want to configure bindings

    3. Click Orchestrations, right-click the orchestration for which you want to configure bindings, and then click Properties.

    4. Click the Bindings tab, and from the Host list, select the host on which to enlist an orchestration.

    5. From the drop-down lists in the Receive Ports column, next to each inbound logical port, select the receive port to which you want to bind the logical port.

    6. From the drop-down list in the Send Ports/Send Port Groups column, next to each inbound logical port, select the send port to which you want to bind the logical port, and then click OK.

    Friday, January 6, 2012 7:58 AM
  • To configure bindings for an orchestration... Item 5, only see a column labeled Outbound Logical Ports. The logical port in the orchestration has been selected and the Send Ports/Send Port Groups column accross displayes the correct send port.

    Friday, January 6, 2012 1:21 PM
  • Hi,

    Cause you configured the logical receive port as direct you cannot bind it to a physical receive port in the admin console. If wanted, you gotta change the binding of the logical receiveport in the orchestration as 'specify later' instead of 'direct'.

    Regards,

    René

    Friday, January 6, 2012 1:27 PM
  • Thanks for hanging in there René.

    Following what you’ve suggested, I blew away everything I had. I started with creating the orchestration with a receive port where the binding was “specify later”. From BTS, created the ‘real’ port and indicated a location to DB2 and added the connection string criteria needed.

     

    Querying the subscriptions for this orchestration I found the following,

     

    http://schemas.microsoft.com/BizTalk/2003/system-properties.ReceivePortID == {2288C0EE-2C7D-49E9-82BF-76520F0E559C}  And

    http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType == http://rcvDB2_Law01#BIZTALK_DB2

     

    I had set the filter in the receive shape in the orchestration for ReceivePortID seen after looking at the promoted properties for a suspended resumable message. Again, the MessageType == http://rcvDB2_Law01#BIZTALK_DB2 is inserted on deployment of the application to BTS.

     

    The MessageType value is derived from the schema for the fields returned by the query run on DB2. Here is the full schema – see targetNamespace and element name.

     

    <?xml version="1.0" encoding="utf-16" ?>

    - <xs:schema xmlns="http://rcvDB2_Law01" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://rcvDB2_Law01" xmlns:xs="http://www.w3.org/2001/XMLSchema">

    - <xs:element name="BIZTALK_DB2">

    - <xs:complexType>

    - <xs:sequence>

    <xs:element xmlns:q1="http://DB2Receive_Select_Law01" minOccurs="1" maxOccurs="unbounded" name="v_law_transfer" type="v_law_transferType" />

    </xs:sequence>

    </xs:complexType>

    </xs:element>

    - <xs:complexType name="v_law_transferType">

    <xs:attribute name="UMID" type="xs:string" />

    <xs:attribute default="n/a" name="LAST_NAME" type="xs:string" />

    <xs:attribute default="n/a" name="INSTITUTION2" type="xs:string" />

    </xs:complexType>

    </xs:schema>

     

    So, how can one promote this field in the orchestration for the message so the filter will work? Thanks.

    Friday, January 6, 2012 8:12 PM
  • Hi,

    If you're using a 'specify later' logical port in your orchestration, it is not needed to set a filter on the Receive Shape.

    When you look at a suspended instance what is the MessageType of that instance? Is it http://rcvDB2_Law01#BIZTALK_DB2?
    If so, is the messagetype of the message defined on the receive shape the same?

    Regards,

    René

    Friday, January 6, 2012 9:01 PM
  • If anyone is looking for Biztalk openings on longterm contract basis in NYC they can call us at 609-500-8204 x 118
    Friday, January 6, 2012 10:13 PM
  • I do have 'specify later' on logical port in orchestration. I removed the filter on the Receive Shape. The suspended instance does not show a MessageType name, Promoted or Not Promoted . I only see these Promoted names...

    InboundTransportLocation DB2://129.***.**.**:****+/SBSD Promoted http://schemas.microsoft.com/BizTalk/2003/system-properties
    ReceivePortID {2288C0EE-2C7D-49E9-82BF-76520F0E559C} Promoted http://schemas.microsoft.com/BizTalk/2003/system-properties
    ReceivePortName ReceivePort2 DB2 Promoted http://schemas.microsoft.com/BizTalk/2003/system-properties
    InboundTransportType DB2 Promoted http://schemas.microsoft.com/BizTalk/2003/system-properties

    The body of suspended instance shows the results from the query run against DB2. The error message for the suspended instance is still...

    The published message could not be routed because no subscribers were found. This error occurs if the subscribing orchestration or send port has not been enlisted, or if some of the message properties necessary for subscription evaluation have not been promoted. Please use the Biztalk Administration console to troubleshoot this failure.

     Also, subscrition details query for the orchestartion shows this expression...

    http://schemas.microsoft.com/BizTalk/2003/system-properties.ReceivePortID

    == {2288C0EE-2C7D-49E9-82BF-76520F0E559C} And

    http://schemas.microsoft.com/BizTalk/2003/system-properties.MessageType

    == http://rcvDB2_Law01#BIZTALK_DB2

    • Edited by bsyren Monday, January 9, 2012 3:21 PM
    Monday, January 9, 2012 3:18 PM
  • Hi,

    How does the subscription of your orchestration now look like?

    Do you have a XMLReceive pipeline configured on your receivelocation?

    Regards,

    René

    Monday, January 9, 2012 3:21 PM
  • I had the Receive pipeline set to PassThruRecieve. I changed it to XMLReceive and received the following error information for the suspended instance:

     

    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: "ReceivePort2 DB2" URI: "DB2://129.***.**.**:****/SBSD" Reason: No Disassemble stage components can recognize the data. 

     

    Here are the settings I used.

     

    The DB2 Transport Properties read as follows:

     

    Connection String: <my connection string>

    Document Root Element Name: BIZTALK_DB2

    Document Target Namespace: http://rcvDB2_Law01

    SQL Command: <my query>

    Update Command: blank

    URI: <my URI string>

     

    The Configure Pipeline – XMLReceive reads as follows:

     

    Stage 1: Disassembler – Component: XML disassembler

    AllowUnrecognizedMessage: False

    DocumentSpecNames: http://rcvDB2_Law01         -> also tried  http://rcvDB2_Law01#BIZTALK_DB2

    EnvelopeSpecNames: blank

    RecoverableInterchangeProcessing: False

    ValidateDocument: False

    Stage 2: RsolveParty – Component: Party resolution

    AllowByCertName: True

    AllowBySID: True


    • Edited by bsyren Monday, January 9, 2012 6:00 PM
    • Marked as answer by bsyren Monday, January 9, 2012 7:40 PM
    • Unmarked as answer by bsyren Monday, January 9, 2012 7:40 PM
    Monday, January 9, 2012 4:54 PM
  • Hi,

    Ensure you have a schema deployed with namespace 'http://rcvDB2_Law01' and rootnode 'BIZTTALK_DB2'.
    And just use the default XMLReceive pipeline, without modifications

    Regards,

    René.

    • Marked as answer by bsyren Monday, January 9, 2012 7:40 PM
    Monday, January 9, 2012 7:09 PM
  • Set DocumentSpecNames to blank and it works. Thanks René!
    Monday, January 9, 2012 7:40 PM