Hello,
I have tried to find a solution to my problem, and despite reading numerous forum posts and information in the manual, I still can't find a solution for the "Wait for Event" activity. In the attached model, I have tried to replicate a simplified example. I have added as much detail as possible.
As you can see in Queue 1, two containers appear, which triggers the token creation event in Source BL. When one of the tokens in that queue leaves the Delay activity, it should trigger the event for the associated token (same queue and reference) that is waiting in the "Wait for Event" to be released.
The linkage must come from the queue since the same reference can be contained in several queues. Currently, only one type of reference per queue.
I have proposed a second alternative with Lists (pull and push). According to what I have read, this option would be equally valid, providing more options for more complex logic and faster execution. I had to create a custom code that returns a query, which comes from a composed string.
I would like to understand if my list proposal is well thought out and if there is any other way to do it without custom code. Additionally, I would like to learn how to do it with the "Wait for Event" method. It seems more intuitive to me. When this case is applied to the real case, the occurrence in the delay will be linked to 245 tokens (= number of queues). It may happen that more than one token is released at the same time. Could this generate difficulties when listening to the event with the "Wait for Event" method?
In the attached model, both alternatives are included. As you can see in the image, in the "Wait for Event" method, I can't get any token to be released with the corresponding Origin or Reference label.
In the list method, I have achieved it as I said, but I would like to know if it could be done without using custom code.
Also, thinking about the scalability of the model, if the initial condition that there is only one reference per queue is changed... I understand that in the query I could add an AND operator to also extract by the reference filter and solve it... This double match condition could be achieved in the "Wait for Event" activity.
How could I do it?
Sumary:
I provide a solution for the pull and push list method. I add a new scenario and conditions for the containers. My reference in more than one queue. A single type of reference in a queue / propose a scalability evolution and make the query evolve to a new condition of more than one reference per queue. Would this more complex filter condition be supported by the "Wait for Event"? The possibility of more than one event occurring at the same time could generate a conflict in any of the methods.
Thanks in advance for your help.
Simplificacion Wait For Event.fsm