How to launch a UBE running repitively

oliverge

Member
In a form ER, I want to launch a UBE which will check the state of given record of a table, if state is the same, the UBE will run again at given interval.

Is it possible to do like this? Someone could point me in direction how to do it?

Thanks a lot,
Oliver
 
Sounds like you want to run a job in a subsystem and use an if clause to call another UBE if the condition is met.


Colin
 
You can code a loop that does this, but you might find yourself into sinchronicity problems.

If the logic performed by the UBE is simple, you should consider creating a NER that does this check and can be called into the loop until it returns a Sucess. UBEs called repetitively might raise slow processing, might raise issues with displaying the PDF or not, might get stucked into queues, etc.
 
Launch an Synchronous BSFN that check the status of the record, waits, then rechecks the status.

There are a LOT of reasons why "not" to do this, though...

Daniel

still....
 
1. Will the UBE run locally or on a server?
2. Does the launching application/form need to wait on the UBE's completion?
3. Is it possible that multiple attempts will be made to launch the same UBE while a copy is still running? (same user multiple times or different users multiple times)
4. What are you actually trying to accomplish? What is the design goal?

Usually its a bad idea to do something like you describe under user control (if I have the right picture). Consider instead either a subsystem job or a ube that runs periodically on the server. That UBE once running can monitor your table and launch other UBE's in a loop
The psuedocode would look like this

DO
- Inspect Record State
- Run UBE?
Yes -> Run UBE synchronously
No -> Set Loop Exit Flag
LOOP Until Exit Flag set

Regards,
 
Back
Top Bottom