Good morning, I'm new on AnyLogic platform and I have started to study it because I want to use it to map the business processes of the company. I've plan to use the Process Model Library of the tool to model the different departments with the aim to study how are now implemented the information flows between departments.
My diagram will be composed by ''source'' elements and different ''assembler'' elements and I would like that the last ones (the assemblers) work as gateways. I enclose a simple diagram to illustrate better the situation (example).
Suppose that ''sourceA'' and ''sourceB'' (placed in different departments) generate two different documents implemented with two custom agents (e.g. agents generated from ''sourceA'' have an ''orderID'' parameter and agents generated from ''sourceB'' have a ''qualityCheckID'' parameter) that are conveyed on the respective queues before reach the assembler component (placed in a different department). The queues, with an high probability are not aligned during the simulation (queue[10] = agent.orderID is set to 10 and queue[10] = agent.qualityIDCheck is set to 9) becuase the departments are not synchronized. I would like that the assembler work as a gateway so it waits for agents that have ''orderID'' equals to ''qualityCheckID'' (that means that the products on a specific order have been validated by the quality department).
Reading the documentation I saw that the agents reach the assembler port when it is free and wait in the queue otherwise. Due to the asynchronization may happen that in the assembler ports are present agents that not have orderID equals to qualityCheckID and in this case I don't want that the assembler's output will be produced. May happen that the necessary agent is in the queue and not in the port so the "assembler" have to search inside the queues to find if the corrisponding agent is present and if it is remove it from the queue (substitute the wrong agent in the port bringing this last one in the queue and produce the output)
Someone can help me to understand how this scenario can be implemented.