|
8# warren520 ) o: v9 e# N% a* x) g6 w0 p# [
简单说一下模型的思路吧:# S* m8 o: W3 Z; Q/ S. ^
首先当Queue中有临时实体进入时,就会启用Queue的进入触发器,然后判断各个Operator的状态,如果有一个Operator的状态为idle,那么就给它发一个消息,该Operator收到消息后会主动检查Dispatcher中是否有Tasksequence,如果有的话,就请求Dispatcher中Tasksequencequeue的第一个Tasksequence,并开始执行该任务。如果有两个Operator的状态为idle时,就随机选择一个Operator发消息,然后被选择的Operator会执行类似上面的操作。) k. `+ n, s# F$ Q/ a# i* L
注:Dispatcher中Pass to中,需要return -1。具体请见帮助文件中的如下说明:
" M. ~6 E- {5 f1 @* aIf 0 is returned, then the task sequence will be queued up using the below mentioned queue strategy, and then will be dispatched to the first available mobile resource. If -1 is returned, then the Dispatcher will do absolutely nothing. In such a case you would use the movetasksequence() and dispatchtasksequence() commands to execute dispatching logic yourself.
4 F% J! w+ I3 ~, O L2 V此外大家也可以尝试使用createsendmessagetask(),createstandardtask(),以及transfernode()等函数,也可以在Script中写代码进行控制。 |
|