summaryrefslogtreecommitdiffstats
path: root/java/sca-contrib/demos/workpool-distributed/workerRules3.drl
blob: a67af910a46aa3b5a8a673ea0e7042b333bf6268 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package workpool
import workpool.*;
rule "AdaptUsageFactor"
	when 
		$workerBean: WorkpoolBean(usageFactor > 0.8)
	then
		$workerBean.addWorkerToNode("");
end
rule "AdaptQueueFull"
	when
		$workerBean: WorkpoolBean((estimedQueueSize > 1900) && jobsComputed > 100)
	then	
		$workerBean.addWorkerToNode("nodeB")
end