Many people are unclear and confused about the difference and usage scenarios of MAX JOBS, FLOW LIMIT and ACTIVATION LIMIT while configuring processes at the time of deploying an EAR. In this tutorial, I am going to explain the difference between these parameters and will discuss their usage scenarios in detail.
This parameter specified the maximum number of process instances that can concurrently be loaded into memory. For example, If you set the value of MAX JOB as 5 for a certain process in its configuration; at a time 5 process instances of this process can reside in memory as shown in the diagram below:
The value to be set for MAX JOB parameter depends on your available memory resources. The number of process instances to reside in memory should be limited keeping in mind the total memory available in order to avoid memory shortage issues in production environment.
However in situations where memory pool is quite high and there is no fear of memory shortage, you can specify value of MAX JOB as 0 (zero). In this case, unlimited numbers of process instances get loaded in the memory without any paging done.
The value of FLOW LIMIT specifies the maximum number of concurrently running process instance to start before suspending the process starter for a certain process.
Once a process engine reaches to the value of FLOW LIMIT; It goes into the FLOW_CONTROLLED state in which new process instances don’t get created and only existing process instances keep on running to their completion. Once the number of running process instances drops to the half of the value of FLOW LIMIT; process engine leaves FLOW_CONTROLLED state and process instances continue to start again.
Activation limit flag specifies that once a process instance is loaded in the memory; It must reside in memory till the time its execution is completed. This flag is useful if we wish to process the incoming requests in sequential manner or if you want to enforce limited concurrent execution of process instances.
Understanding the effects of configurations of MAX JOB, FLOW LIMIT and ACTIVATION LIMIT:
Let’s take different combinations of the configuration values for MAX JOB, FLOW LIMIT and ACTIVATION LIMIT and see how processing of requests by TIBCO process engine is impacted by these values:
Scenario 1: Unlimited Process Instances can be created and Loaded
If available memory pool is very high compared to the incoming requests landing on a TIBCO server, you can specify the values of MAX JOB and FLOW LIMIT as Zero. ACTIVATION LIMIT flag becomes inapplicable in such scenario:
Scenario 2: Limited Process Instance creation with no paging:
In the scenario shown in the diagram below, n number of process instances can be created before placing the engine in FLOW_CONTROLLED state. There is no limit on in memory placing of process instances as value of MAX JOB is set to zero:
Scenario 3: Only a certain number of created process instances loaded in memory:
In the scenario shown below, out of n process instances created, only 1 can be loaded in memory at a time where it resides till completion of its execution. Sequential execution is ensured by setting the activation limit flag: