I have a requirement where i have to design a sequence job which will keep on running and it will look for trigger file.
Trigger file will be created by another master job,which has source as MQ. This job will also keep on running and as soon as message land up to the MQ it will create trigger file.Design will be look like this:-
It will have more then 100 distinct sequences which will be always running and waiting for trigger file.Once trigger file created that particular sub sequence should start.My worry is may these infinite running jobs will eat more CPU resources and phantom process.Is it a good approach to design a flow like this.Need experts advice.
Not an expert , but this is how we had done it.
Since the OS is mentioned as UNIX.
A while loop with a condition for controlling the start and stop of the loop.
In the while loop , check for the existence of the trigger file ,if present run the job using the dsjob command else some wait time to recheck for existence of the trigger file.
Once the job is completed , the while loop will continue to check the existence of the file.
You need a clean mechaism for shutting down the sequence. Therefore you should set a timeout on the WaitForFile activity. If this triggers (Failure trigger = timeout) take a branch to check for the existence of another file that indicates that the sequence should shut down and, if found, invoke a Terminator activity.
The other problem is how to set up an infinite loop in a sequence. A counted loop that has a very large limit should be close enough for your needs.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
There is no such thing as an "infinite loop" in a Sequence job, nor is it a good idea to run one 24x7. At the very least have it stop once a day and then schedule it to restart shortly thereafter.
-craig
"You can never have too many knives" -- Logan Nine Fingers
I implemented such a job sequence a while back and seem to recall having had problems at either 32K or 64K iterations. Best to let it stop and restart before it reaches that number of iterations.
Thanks for your input.My client is very rigid and they dont want to change their flow so we cant directly schedule our jobs in appworks.
We have only this option to look for trigger file which is given to DS as MQ message and then need to trigger out sub sequence.For loop we have given from 1 to 99999. I hope it will cover many iteration.
If he'd written that the platform was Windows I wouldn't have worried about reaching either number as a system reboot would almost certainly occur before that was reached. UNIX has a better chance, but might run out of memory before doing so