There are 3 ways to start EngineServices:
- Start a single Engine Service by calling the startTimer method on the TimerHandlerBean or by using the ‘start engine’ button on the workflow page.
- Start all Engine Services by running the ‘StartAllEnginesTask’ task or by using the ‘start all engines’ button on the workflow page.
- If the JEE version is 6 or higher, the ‘EngineStarterBean’ will run at startup. It will then periodically run the ‘StartAllEnginesTask’ task to start or stop Engine node Services according to the Engine Service configuration.
The amount of engines running at the same time on different nodes can be configured with in the maximumNumberOfNodes field of EngineService The ‘StartAllEnginesTask’ uses the following algorithm to make sure the right amount of engine services runs on the different nodes.
(For each node:)
- Take an unhandled EngineService: engine
- Calculate the number of slots left for engine (#slots = maxNumberOfNodes - #(Existing EngineNodeServices for engine))
- if #slots = 0; do nothing
- if #slots > 0; start a new engineService with the startTimer method
- if #slots < 0; find and stop the current runnning engineService with the stopTimer method, if it exists
- Go back to 1 and repeat until all EngineServices have been handled
The startTimer method starts a Timer and creates an EngineNodeService instance. Each time the timer runs it will update the lastActive and nextRun fields.
The stopTimer stops the timer and removes the EngineNodeService instance.
|3.1.2||3.1.6||Added buttons for starting engines through UI and created StartAllEnginesTask task|
|201710||3.1.7||Changed implementation of StartAllEnginesTask to prevent all engines from being started at the same time|