|
8# warren520 1 M) b; h. h* [* ^6 S' ^
简单说一下模型的思路吧:
0 k8 \3 e) m- R0 N( z) d. H首先当Queue中有临时实体进入时,就会启用Queue的进入触发器,然后判断各个Operator的状态,如果有一个Operator的状态为idle,那么就给它发一个消息,该Operator收到消息后会主动检查Dispatcher中是否有Tasksequence,如果有的话,就请求Dispatcher中Tasksequencequeue的第一个Tasksequence,并开始执行该任务。如果有两个Operator的状态为idle时,就随机选择一个Operator发消息,然后被选择的Operator会执行类似上面的操作。
% T8 ^& {. m. H4 V8 `; ~注:Dispatcher中Pass to中,需要return -1。具体请见帮助文件中的如下说明:( }3 P! n1 x3 A8 Q# }
If 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 O# y& O; O5 A此外大家也可以尝试使用createsendmessagetask(),createstandardtask(),以及transfernode()等函数,也可以在Script中写代码进行控制。 |
|