none
Role Links - Specifying the proper Organization Name as parm to Microsoft.XLANGs.BaseTypes.Party

    Question

  • Inner exception: Destination party not found while attempting to send message 'msg_rcv_EDI_850' to (Delmar, DelmarTest).

    I'm trying to use this syntax: 

    ConfirmOrder(Microsoft.XLANGs.BaseTypes.DestinationParty) =

    new Microsoft.XLANGs.BaseTypes.Party("PartnerName", "OrganizationName");

    from (https://docs.microsoft.com/en-us/biztalk/core/using-role-links-in-orchestrations?redirectedfrom=MSDN)

    I'm a little confused about what is the "OrganizationName". 

    Is that the one of the values in the "Additional Agreement Resolvers" on the agreement below? 
    Or are those used as substitutes for the PartyName.  Why does BizTalk allow mulitple of these? 

    My PartyName=Delmar. 

    I've tried the following so far: 

    new Microsoft.XLANGs.BaseTypes.Party("Delmar", "DelmarTest"); // as per screen shot above

    new Microsoft.XLANGs.BaseTypes.Party("Delmar", "Delmar");

    new Microsoft.XLANGs.BaseTypes.Party("Delmar", "DelmarX12Agreement"); // agreement name

    Thanks,

    Neal Walters



    Thursday, April 11, 2019 3:51 PM

Answers

  • Got it.  I wouldn't use Role Link then.  It requires a Send Port configured in the Agreement which creates a dependency on the Application which breaks deployment.

    I use a combination of two things, BTS.DestinationPartyName for Agreement Resolution (That's the Additional Agreement Resolver) and Send Port Filters.

    Then a custom Promoted Property (Correlation Technique) call like MyApp.850SendPort = "Standard" or "Contoso" or whatever

    So all the standard TP's go to the common map, then Addl Send Ports for Contoso, Fabrikam, etc.

    Don't forget to mark Helpful or Accepted Answers.
    • Edited by Johns-305MVP Thursday, April 11, 2019 7:12 PM
    • Marked as answer by Neal Walters Thursday, April 11, 2019 7:18 PM
    Thursday, April 11, 2019 7:11 PM

All replies

  • The link above said these parms were defined on the party (didn't say the agreement). 

    I also tried this as well: 

    

    Where Delmar is my PartyName: 

    with 

    new Microsoft.XLANGs.BaseTypes.Party("Delmar", "DelmarOrg")

    Neal

    Thursday, April 11, 2019 4:00 PM
  • Also, trying to debug this myself, I turned on SQL profiler, found it ran this: 

    declare @p5 nvarchar(256)
    set @p5=NULL
    exec admsvr_PartnerPortToPEP @bstrPartyValue=N'Delmar',@bstrPartyQualifier=N'DelmarOrg',@bstrOperationName=N'Operation_1',@service_port=N'{F970B36B-7BA9-6027-D0AD-BB5DA1D1DBB0}',@bstrPartyName=@p5 output
    select @p5

    Inside the stored proc, it runs this query: 

         

    SELECT @nPartyID = pa.nPartyID, 
    @bstrPartyName = p.nvcName 
    FROM bts_party_alias pa
    INNER JOIN bts_party p ON p.nID = pa.nPartyID
    WHERE pa.nvcValue = @bstrPartyValue AND
    pa.nvcQualifier = @bstrPartyQualifier

    So based on that I ran this query... 

    Okay, I got it to work now!  I think the second parm is actually the literal "OrganizationName", is that correct?  If so, the sample seems misleading because they also put "PartyName" in quotes. 

    new Microsoft.XLANGs.BaseTypes.Party("Delmar", "OrganizationName")



    Note: This has nothing to do with the properties I assigned on prior post (The "DelmarOrg"). 

    But what if you had multiple agreements, and had to pick one specifically? 

    Neal

    P.S. One other test, I added a new Party called "Delmar2", then ran the query: 

    SELECT *
    FROM bts_party_alias pa
    INNER JOIN bts_party p ON p.nID = pa.nPartyID

    and already the "Organization Name" row was created for Delmar2. 






    Thursday, April 11, 2019 4:10 PM
  • First, just to make sure the use case for Role Links exists...

    What is your ultimate goal here?  Meaning, why are you using Role Links?

    I've found most of the time, there is a easier way.

    Thursday, April 11, 2019 5:22 PM
  • I'm sending out EDI-850 POs to eventually 50 vendors.  I can put the map on the SendPort from a canonical-PO to the 850.  For all the vendors that follow our standard, they use same map.  For the odd ball ones, we create separate maps. 

    Instead of using Roles, maybe I could "Direct Binding" in the orchestration that sets the Party, and use a filter on a SendPort based on my Canonical.  Maybe the reason I shied away from that is the last company I worked with, we sometimes had 10 to 100 CustomerIDs in our database for one "Vendor" (actually trading partners in that case).  Our architect there didn't want anything "dynamic", so we had all those CustomerIDs in filters on SendPorts. 

    Neal 




    Thursday, April 11, 2019 6:10 PM
  • Got it.  I wouldn't use Role Link then.  It requires a Send Port configured in the Agreement which creates a dependency on the Application which breaks deployment.

    I use a combination of two things, BTS.DestinationPartyName for Agreement Resolution (That's the Additional Agreement Resolver) and Send Port Filters.

    Then a custom Promoted Property (Correlation Technique) call like MyApp.850SendPort = "Standard" or "Contoso" or whatever

    So all the standard TP's go to the common map, then Addl Send Ports for Contoso, Fabrikam, etc.

    Don't forget to mark Helpful or Accepted Answers.
    • Edited by Johns-305MVP Thursday, April 11, 2019 7:12 PM
    • Marked as answer by Neal Walters Thursday, April 11, 2019 7:18 PM
    Thursday, April 11, 2019 7:11 PM
  • Okay, I never really used RoleLinks, so jumped to the conclusion that maybe that's what I needed. 

    This article: https://docs.microsoft.com/en-us/biztalk/core/using-role-links-in-orchestrations
    s
    eems to suggest that their proper use is when need to select a vendor/party at run-time based on some business logic.  

    Neal 

    Thursday, April 11, 2019 7:20 PM