Not sure – distinguished Field or Promoted Property

Home Page Forums BizTalk 2004 – BizTalk 2010 Not sure – distinguished Field or Promoted Property

Viewing 2 reply threads
  • Author
    Posts
    • #25296

      Hello.

      I was searching for a while here and found some Blogs and Posting regarding distinguished fields and Promoted Properties. But to be honest, I still have some questions how to use it.

      Szenario:

      I want to receive a txt-file which include just one number. This number will be used as an parameter in an orchestration to call a stored procedure with parameter over a SQL Adapter.

      What I have build so far is a small map (just for the parameter) and a pipeline for disassemble the flat file. Now some questions coming up.

      a) What should I use in this case, a distinguished field or for easier use the promoted field?

      b) What do I have to do to make this field/element in the schema a promoted property or a distinguished field?

      c) How can I get access in the orchestration to this field and pick up the number for the adapter?

      Do you think that’s a way to go?

      Thanks a lot in advance.

      Wolfgang

    • #25297

      Hi Wolfgang,

       

         I would recommend not using the map, if you are just mapping that one parameter from the flat file schema to your SQL adapter request schema.

         Basically, you can make both fields as distinguished fields, in both flat file and SQL adapter request schemas, and assign one to another in a Message Assignment shape with the following line of code (beforehand, you would declare two orchestration-level messages with their types respectively from the Flat File schema and the SQL Adapter request schema):

      SQLAdapterSchemaMessage.Record.DistinguishedField = FFSchemaMessage.Record.DistinguishedField;

       

         Then, in the same flow of your orchestration, you would have a logical Send shape and a logical Receive shape linked to a logical two-way Port that represents the call to your SQL adapter (which you would configure in the Administration console).

       

         Does this scenario make sense to you?

       

         Daniel.

       

      • #25298

        Hello Daniel.

        Yes, sounds very good.

        I have a request schema with one element for the parameter from the txt-file (disassembled in the receive pipeline). And one more schema for the response from the SQL Adapter do I need one more schema?

        And one more “mysterious” thing is, I can’t make the fields/elements to distinguished fields. As far as I know there should be in the element/field properties an distinguished area where I can handle this. Am I wrong? [*-)]

        But I like your way … I will try this out.

        Thank you very much.

        Wolfgang

        • #25299

          Hi Wolfgang,

           

             See my response below…

           

          [quote user="wal"]

          I have a request schema with one element for the parameter from the txt-file (disassembled in the receive pipeline). And one more schema for the response from the SQL Adapter do I need one more schema?

          And one more “mysterious” thing is, I can’t make the fields/elements to distinguished fields. As far as I know there should be in the element/field properties an distinguished area where I can handle this. Am I wrong? Confused

          [/quote]

           

          When you generated your SQL Adapter schema from the wizard, you should have a Request-type node and a Response-type node under your top-level node in the schema, so you should make that field located under your Request-type node to be a Distinguished field (which will map to the parameter in your Stored Procedure).

           

          Remember that you can only make a field to be a Distinguished Field if its parent record (or the field itself) is non reoccurring, which means that only one instance of that record (or field) is expected, so check the Max Occurs property of the parent record (or field) and make sure that it is either blank or set to 1. Once this is set, you right-click on the field node and choose the option “Promote” and underneath that, choose the sub-option “Show Promotions…”, which will bring up the Promote Properties window, then make sure the Distinguished Fields tab is active (on the right-hand side), and highlight the field node that you want to be Distinguished (on the left-hand side) and click on the “Add >>” button in the middle and click the Ok button to save the changes.

           

          Hope this helps,

           

          Daniel.

          • #25315

            Hi Daniel.

            Ah ok … I understand now. I was looking on the wrong place.

            Thanks a lot.

            Wolfgang

    • #50340
      biztalkgurus

        The Fattening Hut : Pat Lowery Collins : 9780618309559

    Viewing 2 reply threads
    • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.