Worker bees: Light Process Execution
You know you're doing something right when your community finds creative use cases for the platform features. OutSystems Business Process Technology (BPT) has been around for quite some time. It evolved from an OutSystems common application to being fully integrated into the platform server and the development tool, somewhere in version 5 if memory serves me right.
Throughout the years we've seen some BPT implementations with 100% automatic activities, more like a database queueing system where hundreds of asynchronous processes are launched to complete a task.
This use case had some inefficiencies but OutSystems answered the call.
Technical details
Lucio Ferrão, founding father, home genius and good friend, takes you through all the technicalities in his blog post Pump Up the Volume.
Setting up and Prerequisites
This feature was introduced in version 10.0.804 and it will work on the .NET stack with MS-SQL and Oracle databases.
The workflow must have a single automatic activity, must be launched implicitly with an OnCreate event from an OutSystems database entity and you must not expose the process entity. You cannot mix LBPT and BPT in the same module.
In your server management console (service center) you can enable this feature for your module as so.
When you publish you get this warning.
The documentation can be found here.
Testing it out
To demonstrate the differences in performance we'll create 2 modules with exactly the same implementation, one using LBPT and the other BPT.
A simple entry on a table for which the task is to grab a new entry and update the completion date and the status.
On the workflow side, they are also exactly the same
Testing Implementation
The next step is to build a test application where we load some entries into the queue and the process them, periodically checking on progress and calculating some statistics.
See it in action
Go build those apps!
nice articles about this
Interesting post, thanks Rui Barbosa