Would it be possible to use the OSADMIN.OSSYS_BPM_EVENT_QUEUE table to give certain processes priority?
I'm just guessing that the order of the activities is determined by either the "next_run" or the "enqueue_time" column. What if, in the On_Ready callback I put these datetimes on the activity like 1 hour earlier? Would that actually move the activity on top of the list to be executed? Does anyone have any experience with this?
(I'm asking this, because there is an application that -at times- creates 10 000 processes, and these block all other processes from being executed, while some of those are more time-critical than those 10k ones. And as far as I know, there is currently no easy way to give certain processes priority (we're on 9.0 on premise))
The next_run is used to define the order of events. Remember that changing data from ossys_bpm_event_queue is not endorsed nor supported by OutSystems.
We currently don't have any priority mechanism in place for your scenario.
Can you explain the task each process has to execute?
How long can you wait for them to be executed?
Have you considered doing them in bulk?
Tim Timperman wrote:
Thank you for your reply.
It's a bit hard to explain the different processes, but the 10K ones are invoices that are being generated and they typically take a few seconds each. (generating pdf, etc).
I'm just trying to explore our different options. Refactoring either proces, or being able to prioritize one over the other. Something I noticed, (and didn't expect) is that with zones, you are able to force processes to run on specific servers. Is this correct? If it is, this could also be a way to make sure that our urgent proces gets picked up while invoices are being generated on another server.
You are correct, you can use zones to split your load among servers. Did not remember that one. Good job.
Alternatively, you could have the processes do nothing but simply set a status somewhere (which should be fast enough), and have a timer pick those up, process them, and then advance the process (based on another status change)?
Kilian, thanks for your reply.
Yes, we are aware that there are other ways to solve this issue. I'm investigating all possible solutions and was wondering if there was indeed a way to somehow force a priority on process activities.
I also prefer a cleaner solution, but in case I ever need it, at least I know it might be a possibility to "play" with priorities.
For your case I'm with Kilian.
In this way you can still let your eSpace that runs the invoice timer run in a background zone, to keep maximum performance on your front-end zone.