@Óscar Manuel CMN
1. What is the ID tag for?
This was just so I could easily color-code the tokens that represent the operators, using the "Visualization" properties of the Process Flow. A red token for the red operator, a green token for the green operator.
2. What does trueQueuesize do and what does it expression mean?
getstat(List("ItemList1").as(treenode), "PartitionContent", STAT_CURRENT, value)
I found the queueSize field that comes with an Item List was insufficient for checking if there was something in the queue in your case. So the getstat() command is looking at the contents of the Item List partition that I assigned to each of the queues. So the trueQueueSize is taking into account that something could still be in the queue even though it has been pulled from the List, which means it won't be in the queue for much longer because an operator is traveling to retrieve it.
3. Are "customode" tabs necessary?
I'm not sure what you mean by this. Do you mean the Custom Code activities that set the operators state? I put those in so that the operator's states don't show as "idle" while they are waiting for the process times to end. IF you don't care about the operator's state reports you can remove those.
4. I know that in the Condition tab inside "DECIDE" you look if there are more objects in the queue but how does the expression you write there work?
getstat(getactivity(processFlow, "List: Items"), "PartitionContent", STAT_CURRENT, current, token.PulledQueue) == 0
Same as trueQueueSize explanation. Needed to know if there was an available item in the queue, more than if there was one just present, because it might have been pulled already.
In your attached model, you didn't include the decide to see if the queue was empty, which means you also don't have the connector that the max wait timer is looking for on the pull from the item list, or the connector needed to continue pulling items from the List.