AnsweredAssumed Answered

Job Acquisition filter

Question asked by smirzai on Feb 18, 2013
Latest reply on Sep 20, 2013 by frederikheremans1
We have a need here. In a cluster deployment model, it might be the case, that some nodes do not have the resource to do an async job, temporarily or permanently. The desired behavior would be to able to configure which nodes pick which jobs.

It might be also in some other case. Just imagine we have two machines, one fast and one slow and we want the higher priority tasks to be executed in Fast machines.

It is already mentioned in forum that it is not easy to implement the job prioritization by its sheer sense. But this way  might be a compromise.

Here is a proposal on configuration:
<bean id="jobExecutor" class="org.activiti.engine.impl.jobexecutor.JobExecutor">
   <property name="jobFilter" value="jobName='proc_def_1'"/>

To address the above second case, it might useful to set a new generic parameter, say "param1" to job Executer table. This parameter can be set in xml definition file. Something like:
<serviceTask id="service1" name="Generate Invoice" activiti:class="my.custom.Delegate" activiti:async="true" activiti:param="1" <!– means to be run on fast machine/>

I can try to see how this feature could be implemented.  Would it be a reasonable extension ?