Answered ContextAccessor Functoid use during the map

  • יום חמישי 30 יולי 2009 19:03
     
     
    I am tyring to pass the original file name to the map during processing. The destination is a sql database. I found a function context accessor but for whatever reason I can not seem to get it to work. All I am trying to do is get the recieved filename to pass to in the map. Is there an easy way to do this or does anyone know what I need to pass to the context? Any help is greatly appreciated.
    New post

כל התגובות

  • יום חמישי 30 יולי 2009 20:52
     
     תשובה
    Hi

    There are two context accessor functoids. I have described them here:
    http://blog.eliasen.dk/2009/04/01/TheContextAccessorFunctoidPartI.aspx
    http://blog.eliasen.dk/2009/04/15/TheContextAccessorFunctoidPartII.aspx
    http://blog.eliasen.dk/2009/04/15/TheContextAccessorFunctoidPartIII.aspx

    Your post does not tell us which one you are trying to use - the one for receive ports or the one for orchestrations. For what parameters to pass to the functoids, see my blog posts.

    If you are using the one for receive ports, you need to use the pipeline component that comes in the same download. It needs to be GAC'ed and put into the "Pipeline components" folder of the BizTalk installation folder. Then you can reset the toolbox in VS.NET and use that component in your own pipeline. Remember to also add the XML disassembler if needed or other compoennts that are needed.

    eliasen, representing himself and not the company he works for.
    Three times MVP and three times MCTS in BizTalk.
    Blog: http://blog.eliasen.dk
    • סומן כתשובה על-ידי Carlos T. _ יום שלישי 04 אוגוסט 2009 11:59
    •  
  • יום חמישי 30 יולי 2009 21:05
     
     
    I was actually hoping that you would be the one to answer. I read a post where you specified some context accessors, but I did not see the links you posted above. I ended up using one from Marvin Smit. Basically all I want to do is pass the file name during the map. During the map, I pass those variables to a scripting functoid that goes to a sql table. Everything works, but i can not seem to get the filename going. I have actually not seen those links that you put out. They look very helpful. I will try those and get back to you tomorow. Thank you for your help.
    New post
  • יום חמישי 30 יולי 2009 21:09
     
     
    Hi

    It is important to note, that you cannot "pass the filename to the map". The only thing going into a map are messages. So what you need is a functoid that will read the filename from the context of the message.

    Take a look at the posts, and if you have questions... just ask :-)
    eliasen, representing himself and not the company he works for.
    Three times MVP and three times MCTS in BizTalk.
    Blog: http://blog.eliasen.dk
  • יום שישי 31 יולי 2009 14:36
     
     

    Hi Eliasen;
    I took a look at the functoids and have one question. I have modified the map to call the functoid that should pass the context to the map. I also added the context to the pipeline at the end on the resolve party. I am trying to pass any value to the map throught the orchestration. All the maps are called from orchestration. I followed your example, but there is one thing that I can not do. I am using X12 schema and can not promote a field. Nevertheless, I was expecting that at least I could pass in a value. So this is what I have done in the orcchestration. Call the construct, assign the messesage and then on the message assignment shape I put the following code:

    OutputMessage.REF02__ClaimOriginalReferenceNumber = Outgoing_837P(BTS.MessageID);

     


    Problem is that it keeps telling me that REF02__ClaimOriginalReferenceNumber does not exist on the OutputMessage. Would this have anything to do with the promotion or just the syntax? Thank you again for your help.

     


    Problem is that it keeps telling me that REF02__ClaimOriginalReferenceNumber does not exist on the OutputMessage. Would this have anything to do with the promotion or just the syntax? Thank you again for your help.

     


    New post
  • יום שישי 31 יולי 2009 15:37
     
     
    Hi

    There are 2 functoids:
    The first can be used in a map called from an orchestration.
    The other can be used in a map called in a receive port. THIS one (and NOT the other) requries you use the pipeline component that ships with the functoids.

    It sounds like you have these messed up - ie. you are using the pipeline component and the functoid that can be used in a map on a receive port, but you are calling the map from an orchestration.

    If all your maps are called form an orchestration, then skip the pipeline component - it is not needed or used. Then amke sure your maps use the functoid that is usable in a map that is called form an orchestration.

    Still have issues?

    eliasen, representing himself and not the company he works for.
    Three times MVP and three times MCTS in BizTalk.
    Blog: http://blog.eliasen.dk
  • יום שישי 31 יולי 2009 17:32
     
     
    Ok I have removed the pipeline component. The way I have it now is the following. The functoid is called in the map. I am passing the following variables, Imputefillane, receivedfilename, and the path to the schema as you poiinted in your site. Then in the orchestration I am calling the path that I pointed above., The problem is that the destination is not promoted, so I am not sure if that is an issue. Basically all I want to do is pass to the map the file name that came in.  It seems that I am missing a step somewhere in the instructions.
    New post
  • יום שישי 31 יולי 2009 18:06
     
     
    Hi

    The functoid should take three parameters:

    The first parameter should be the name of the message that has the property in it.
    The second parameter should be the string "ReceivedFileName" without the quotes.
    The third and last parameter should be the string "http://schemas.microsoft.com/BizTalk/2003/file-properties" without quotes.

    If you are actually using these parameters, then what error are you getting? Or are you just getting an empty element?

    eliasen, representing himself and not the company he works for.
    Three times MVP and three times MCTS in BizTalk.
    Blog: http://blog.eliasen.dk
  • יום שישי 31 יולי 2009 19:42
     
     
    Okk I got those 3 parameters. The problem I am having is on the orchestration. No matter what values I am putting, I keep getting an error. That is where i am getting a little stuck. I am assigning the values after the transnform just like your example, but I can not seem to get the values assignment to work. Again any help, is truly appreicated. :-)
    New post
  • יום שישי 31 יולי 2009 20:05
     
     
    Hi

    In my post, I am NOT assigning anything after the transform. The functoid is used in my example to get the value from a specific promoted property into the destinations chema of the map - all INSIDE the map.

    The assigment I am doing afterwords is used to get the value of a property that is NOT promoted, but only written to the context into the destination.

    Since you are in need of the FILE.ReceivedFilename property, which is promoted, you can use the functoid and do not ahve to do any message assignment afterwards.

    eliasen, representing himself and not the company he works for.
    Three times MVP and three times MCTS in BizTalk.
    Blog: http://blog.eliasen.dk
  • יום שלישי 04 אוגוסט 2009 13:07
     
     
    thank you for your help.
    New post
  • יום שישי 05 נובמבר 2010 19:39
     
     
    I have another question on this topic.  I need to map ISA13 and GS06 from an inbound EDI message to the output message.  The map is called in the orchestration.  I am using the orchestration context accessor (OCA)functoid to pull EDI.ISA_Segment and EDI.GS_Segment.  However, I need to access the ISA13 and GS06 values within these properties.  The mapper will not allow me to link the OCA functoid to the String Extract functoid, or any other functoid.  The output of the OCA functoid will only link to the destination schema.  Is this a limitation of the OCA functoid or is something wrong in my project?
  • יום שני 08 נובמבר 2010 07:40
     
     תשובה

    Hi

    Yes, that does indeed appear to be a limitation of the functoid. It has its output connection type set to "Field".

    You could download the source code from odeplex and modify it to suit your needs.

     


    eliasen, representing himself and not the company he works for.
    Four times MVP and three times MCTS in BizTalk.
    Blog: http://blog.eliasen.dk
    • הוצע כתשובה על-ידי FrankD302 יום שני 08 נובמבר 2010 14:58
    • סומן כתשובה על-ידי Steef-Jan WiggersMVP, Moderator יום ראשון 25 דצמבר 2011 13:45
    •  
  • שבת 24 דצמבר 2011 18:25
     
     

    From where these can be downloaded?

    Can they be used as is in biztalk 2010 version?

    Thank you.

     

  • יום ראשון 25 דצמבר 2011 11:38
     
     תשובה

    http://contextaccessor.codeplex.com/

    And yes they can.

     


    eliasen, representing himself and not the company he works for.
    Five times MVP and four times MCTS in BizTalk.
    Blog: http://blogs.eliasen.dk/technical/
  • יום שלישי 21 אוגוסט 2012 15:50
     
     

    Hi Eliasen,

    I am trying to access the context property of a message inside a map. So I have used the ContextAccessor functiod from codeplex (http://contextaccessor.codeplex.com/). But this functiod seems to work only when I map the output of the functiod to output schema directly, but not as a input to another functiod. Is it true that I can't use this functiod to pass the output of this function directly to the other functiod’s input like scripting functiod.


  • יום שלישי 21 אוגוסט 2012 19:57
     
     

    Hi

    Actually, I answered this question previously in this thread.

    Copy-paste begin:

    Yes, that does indeed appear to be a limitation of the functoid. It has its output connection type set to "Field".

    You could download the source code from odeplex and modify it to suit your needs.

    Copy-paste end.

    Hope that helps.


    eliasen, representing himself and not the company he works for.
    Five times MVP and four times MCTS in BizTalk.
    Blog: http://blogs.eliasen.dk/technical/