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?
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?
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.
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?
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?
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.
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’.