locked
how to schedule biztalk job and receive location RRS feed

  • Question

  • Hi..

    i need to schedule receive location on daily basis on a particular time as we have to fetch data FTP server on daily basis on a particular time.

    I have created Receive location, schedule the job, give "xmlstring" for request

    But this request xml is not placing into my request folder? Please suggest.

    Thanks.

    Thursday, May 29, 2014 3:46 AM

Answers

  • Normally the FILE receive has URI like *.xml or something to that effect.. never %SourceFileName%.xml. I'm not even sure that %SourceFileName% Macro works on Receive Locations. IMHO, it works on SEND ports because BizTalk takes the CONTEXT Property FILE.ReceivedFileName and then strips the path to get the FileName and then substitutes the %SourceFileName% MACRO with it to create the output file.

    In your case to trigger the orchestration you should be receiving *.xml while the ScheduleTask Adapter should be writing <somename>.xml

    Regards.

    • Marked as answer by raj_BizTalk Tuesday, June 3, 2014 3:10 AM
    Monday, June 2, 2014 2:05 PM

All replies

  • Well if you have to do this ONLY once then the simplest way would be to use "Service Window" on the Receive Location.

    Refer http://msdn.microsoft.com/en-us/library/aa559260.aspx - How to Configure Scheduling for a Receive Location.

    Regards.

    Thursday, May 29, 2014 4:52 AM
  • Not like this.   

    In Receive location there is a option for "Schedule Task".  I already finish the configuration but i dt know how to make this one to place request file into my request folder?

    Thursday, May 29, 2014 6:48 AM
  • To schedule receive location on daily basis on a particular time you can consider using Scheduled task adapter

    Try the scheduled task adapter this will satisfy your requirement.


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

    Thursday, May 29, 2014 8:55 AM
  • Are you using the schedule task adapter? The schedule task adapter places a specific XML (Message) into a folder depending on a schedule. This is used where you want to trigger activities (orchestrations) as specific intervals as opposed to request-based. IMHO, scheduled task adapter is not suited for scheduled receive - (programmatically you can trigger script which will enable the receive location which in turn will pickup the file, but then by the same logic, you can use the Windows Scheduler to trigger an FTP script to do the same.).

    My understanding of your requirements is that @ a given time every day you want to pick up a file from a FTP location. To pick up a file from an FTP location you would need a receive port. Once a receive port is started, it polls the destination as a predefined interval. You can change this interval to 24 * 60 * 60 which will cause it to poll ONCE a day after the Receive Location has been enabled.

    Or on the receive port when you enable service window, even though enabled, the receive location will poll the destination ONLY during the service window when if a file is places at the destination, it will be picked up and delivered to BizTalk.

    Regards.

    Thursday, May 29, 2014 9:15 AM
  • Yes. I am using schedule task adapter 4.0.   I have given the request xml under "XmlString" but, how this will place into a specific folder (for me its not placing) 
    Monday, June 2, 2014 4:01 AM
  • Can you check Tracking and see if there has been any activity (instances) in BizTalk.

    Morten la Cour

    Monday, June 2, 2014 5:26 AM
  • This is the error message i am receving when i enable tracking

    A message sent to adapter "FILE" on send port "SP-TEST-Error" with URI "X:\BTF\TEST\Error\%SourceFileName%.xml" is suspended. 
     Error details: The FILE send adapter cannot open file X:\BTF\TEST\Error\%SourceFileName%.xml for writing.
     Details: The file exists.

    I wants to place my request file into X:\BTF\TEST\request\%SourceFileName%.xml

    Thanks.

    Monday, June 2, 2014 6:50 AM
  • Well apparently there is already a file in the Folder with the name you are trying to insert.

    I can see that you are using %SourceFileName%, so there must be a file with the same name as the file submitted to BizTalk there already.

    You have two choices

    1) Use something unique for your target filename (recommended) %SourceFileName%-%MessageID%.xml

    2) Set Copy Mode to  Overwrite instead of Create New on your Send Port File Adapter configuration (not recommended unless you NEVER need the old messages)

    Morten la Cour

    Monday, June 2, 2014 6:54 AM
  • Could you please explian, how this placing request file into the respective folder. how is the link? where its taking this input.

    Many Thanks.

    Monday, June 2, 2014 8:45 AM
  • Normally the FILE receive has URI like *.xml or something to that effect.. never %SourceFileName%.xml. I'm not even sure that %SourceFileName% Macro works on Receive Locations. IMHO, it works on SEND ports because BizTalk takes the CONTEXT Property FILE.ReceivedFileName and then strips the path to get the FileName and then substitutes the %SourceFileName% MACRO with it to create the output file.

    In your case to trigger the orchestration you should be receiving *.xml while the ScheduleTask Adapter should be writing <somename>.xml

    Regards.

    • Marked as answer by raj_BizTalk Tuesday, June 3, 2014 3:10 AM
    Monday, June 2, 2014 2:05 PM