webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  scheduling service

    Posted Tue July 18, 2006 12:27 PM

    Hi,

    I need to schedule a service after completing the execution of another service, Please help me to achieve this.

    for eg:
    service1 scheduled at 1:00 pm and it runs for 2 or 3 hrs,
    service2 has to be scheduled after completion of service1.

    Regards,
    RDS


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 2.  RE: scheduling service

    Posted Tue July 18, 2006 01:47 PM

    The obvious method is to create service3 which invokes service1 and service2 consecutively. You can then schedule it in place of service1. Is there a reason you can’t do this?

    Tim


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 3.  RE: scheduling service

    Posted Tue July 18, 2006 02:21 PM

    Hi Tim,
    Thanks for your solution!.
    I will explain the complete scenario:

    service1 scheduled at 1.00pm
    service2 scheduled at 1.15pm
    service3 scheduled at 1.30pm

    all the above service generates a file and saves it in pub folder.

    service4 scheduled at 4.00 pm which picks up all the 3 files and transfers it to FTP.

    The service1,service2 & service3 ending time varies some days ends before 4.00pm (then no problem). some days exceeds the time then the incomplete file is transferred to FTP.

    In order to avoid incomplete transformation service4 has to be scheduled or executed after completion of all three service’s.

    could you please provide me a solution.

    I have one solution, setting up a flag in completion of each service and the service4 is scheduled in duration of 0.5 hrs from 4.00pm for 3 times.
    when the flag is found then the file is transferred to FTP otherwise nothing.

    Is there any other solution for the above case?Is there way of scheduling service after completion of other?

    Sorry for not giving clear picture before.

    thanks in Advance

    Regards
    RDS


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 4.  RE: scheduling service

    Posted Tue July 18, 2006 02:43 PM

    Service 1, 2 and 3 can each publish a document upon completion. You can create a trigger in IS that will invoke Service 4 only when all three completion documents have been received.

    Mark


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: scheduling service

    Posted Tue July 18, 2006 02:59 PM

    service 1,2 & 3 do not publish a document, they creates a very large file(approx 100mb) in pub folder of the same package. service4 just picks up the file and transfer to FTP.
    Always 3 files exist in pub folder, every day all the three files are overwritten with new inputs.

    so, how can we identify whether the file creation is completed?? and trigger service4?

    RDS


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 6.  RE: scheduling service

    Posted Tue July 18, 2006 03:06 PM

    Since the three services are independent of each other, and the three files always already exist, you would need to do something such as Mark suggests. If you do not wish to modify any of the three services, can you create a wrapper around each of them that does the publishing when they are complete?

    Tim


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 7.  RE: scheduling service

    Posted Tue July 18, 2006 03:12 PM

    Eac service can also rename the file with a specific extension when it is complete. Service 4 could be kicked off at some type and then check on a regular interval for the presence of all three files with that extension.

    You’ve now received 3-4 very workable suggestions for your situation. That’s your quota for the day! Good luck.

    Mark


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 8.  RE: scheduling service

    Posted Tue July 18, 2006 08:24 PM

    rdshankar,
    Apart from all the solutions provided, you can also schedule your service 4 after you have run the other 3 by using this service ‘WmPublic/pub.scheduler:addOneTimeTask’.

    Regards
    Shantanu


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services