TaskQueueScheduler

Category: Modules
Subcategory: Scheduling

Overview

 The TaskQueueScheduler module delivers flexible, dynamic scheduling of microflows on available taskqueues while avoiding hardcoded (in Mendix Studio) ScheduledEvents and TaskQueue assignments. Via same UI it also allows running and tracking microflows in batch (on Batch taskqueue)

Documentation

This TaskQueueScheduler module is developed to replace old MicroflowScheduler and ProcessQueue modules from AppStore
in a Mendix 9 compliant way, because both became deprecated with Mendix 9.

Microflow scheduling functionality:
Module delivers flexible, dynamic scheduling of microflows so we can avoid most hardcoded (in Mendix Studio) ScheduledEvents. 
The Schedule handler (scheduled every minute) now puts microflows on the specified Schedule TaskQueue when specified runtime 
is reached.

ProcessQueue functionality:
When a microflow is started on a Taskqueue via Schedule the Schedule_Overview page shows  Queued/Running, Finished and 
Cancelled tabs to track running microflows. Also it shows a Configuration tab where you can dynamically set/update the 
TaskQueue a microflow is to run on. It is not required to preconfigure a microflow on a TaskQueue upfront (like in ProcessQueue). 
A new (yet unknown) microflow started via Schedule will be added and run on default Batch TaskQueue automatically.
Via Configuration tab you can also directly run (non-scheduled) microflows without input parameters.

To conclude the TaskQueueScheduler module now delivers flexible, dynamic scheduling of microflows on available taskqueues 
while avoiding hardcoded (in Mendix Studio) ScheduledEvents and TaskQueue assignments.

Dependencies:
- Depends on Mendix 9 or higher as that introduced TaskQueues.
- Depends on MxModelReflection module (so please install and synchronize that first) to get microflows without input parameter (to run on schedule queues)
 

How to configure:
Download TaskQueueScheduler module from Appstore into your application.
Open Schedule_Overview-Confuguration and hit to initialize TaskQueue objects.
You'll also need to go there when you add/change  Mendix TaskQueues in your application

YML adjustments so not all ScheduledEvents from Studio keep on running after switching to taskqueue scheduler:
# * * * Scheduled Events * * *
# ALL, NONE or comma delimited .
#  no spaces in between SCHEDULED_EVENTS: 
TaskQueueScheduler.ScE_SchedulerQueues

How to use:
By default there are 3 Schedule, 1 Batch and 1 Batch3Treads Mendix TaskQueues defined, but you can add more when desired. 
Additional TaskQueue(s) can be created in any module, just remember to also update theTaskQueue objects to the new situation via Schedule-Configuration button.
For each TaskQueue object you can set AllowScheduling or not (default)
Via Schedule-Configuration you can run microflows without input parameters on the fly.
Via microflow you can start a schedule with QueuedAction object input which allows for running big updates in small batches or just specifying an other input object.
Starting microflows on a queue via StudioPro will work as always, but then the microflow will not appear in Queued/Running tab and you do not have the option to change the TaskQueue dynamically.

Releases

Version: 1.0.0
Framework Version: 9.6.4
Release Notes: First Release