none
Multiple Schedules for an EDI Party RRS feed

  • Question

  • I am looking for a way to setup multiple batch schedules for the same EDI party. I need one schedule to run Sunday - Thursday at a given time and the second schedule to run on Friday at a different time. When looking at the Batch scheduler, it appears that it does not allow for multiple schedules. My next thought was that I would set up a two batches for the same EDI party with different schedules.

    The issue I am running into is that we have an orchestration that sets the EDI.BatchId, EDI.DestinationPartyID, EDI.DestinationPartyName, EDI.EncodingType and EDI.ToBeBatched values and then uses a correlation set that is tied to a direct bound port. The port uses the option "Routing between ports will be defined....". I need to be able to set all of the values except EDI.BatchID so that both of the Batches can "see" the file. That way whichever batch is running would be able to pick up the file for processing.

    My orginal batch was defined with a filter that included EDI.ToBeBatched and EDI.DestinationPartyName.

    I have a send port defined with a filter that included EDI.DestinationPartyName, EDI.ToBeBatched and EDI.BatchName. 

    When working with a single batch, the batching works like it should. Now that I am trying to create seperate batches for different schedules, I cannot figure out how to make it work for both. I do not want to create a seperate orchestration for each schedule.

    I tried replacing EDI.BatchId with EDI.BatchIds in the orchestration and chaging the correlation set to use EDIBatchIds instead of EDI.BatchId, but the message always gets suspended with the "An exception has occurred during the execution of the upgrade batch Orchestration. Errror Message = The batch was not found" error.

    Resources I have used include:

    Known issues with EDI Batching: http://msdn.microsoft.com/en-us/library/bb246093(BTS.10).aspx

    Assembling a Batched EDI Interface: http://msdn.microsoft.com/en-us/library/bb245977(BTS.10).aspxEnvironment:

     

    BizTalk Server 2009 (Standard) running on a 64-bit Windows Server 2008 machine.

    SQL Server 2008 (Standard)

    Friday, September 24, 2010 7:57 PM

Answers

  • The simpliest way is to use the Task Scheduler (utiility from Windows) to Enable/Disable the Receive Locations with simple WMI scripts. You can find the script samples in the BizTalk Samples.


    Leonid Ganeline [BizTalk MVP] Biztalkien blog
    • Proposed as answer by Carlos T. _ Wednesday, October 13, 2010 2:57 PM
    • Marked as answer by Obach Tuesday, October 19, 2010 1:25 PM
    Monday, October 11, 2010 3:09 PM

All replies

  • Hi OBACH,

     

    I am also trying to solve the same problem.I am doing a POC on it and will let you know once i am successfull.

     

    the path i am trying to reach is to create a party and a batch with custom code .(Microsoft.Biztalk.ExploreOM) whenever it is required and then delete the Party when its done.

     

    this is little bit diffciult ,but will let you know once done.

     

     

    Thanks....
    SPN


    Thanks... SPN
    Friday, October 8, 2010 1:34 AM
  • Does anyone know of a good tool for scheduling batches in BizTalk Server 2009?

    I am looking for a tool that will allow for multiple schedules for the same batch.

    example:

    M-F 5:00 pm

    Sat 1:00 pm

     

    Monday, October 11, 2010 2:28 PM
  • The simpliest way is to use the Task Scheduler (utiility from Windows) to Enable/Disable the Receive Locations with simple WMI scripts. You can find the script samples in the BizTalk Samples.


    Leonid Ganeline [BizTalk MVP] Biztalkien blog
    • Proposed as answer by Carlos T. _ Wednesday, October 13, 2010 2:57 PM
    • Marked as answer by Obach Tuesday, October 19, 2010 1:25 PM
    Monday, October 11, 2010 3:09 PM
  • I've answered you in another thread.
    Leonid Ganeline [BizTalk MVP] Biztalkien blog
    Monday, October 11, 2010 3:10 PM
  • Thanks. I will take a look at the sample.
    Monday, October 11, 2010 3:14 PM
  • You know the best way to acheive what you are trying to do is to cretae a stored procedure that will populate the table you are subscribing with biztalk. The table will remain empty. The stored procedure will populate the table based on a schedule you run from SQL. You can schedule it anytime you want with multiple schedules even. Depenidng on your needs, this is what I recomend. I am not sure I would get into stopping and starting the services.
    Please Indicate "Mark as Answer" if this Post has Answered the Question
    • Proposed as answer by Carlos T. _ Wednesday, October 13, 2010 2:57 PM
    Monday, October 11, 2010 4:23 PM
  • Check out my idea on the post. I believe it will help.
    Please Indicate "Mark as Answer" if this Post has Answered the Question
    Monday, October 11, 2010 6:53 PM
  • I think the easiest way is to use the windows task scheduler to run batch files which can enable/disable the receive location. Create two bat files one to call the wmi script to disable the receive location and the one to enable the receive location and then create a task for different schedules to run those batch files.

    Another option is to create a windows service in .net to do the same thing, reading the scheduled information from configuration file and enable disable the receive location.

     

    Regards,


    i.ahmad Please mark this as an answer if it helps
    Monday, October 11, 2010 8:07 PM