question

sara S2 avatar image
0 Likes"
sara S2 asked sara S2 commented

How to set the event "a group of objects are free"?

Hello,

In "Wait for Event1" I want to set the event that corresponds to: the ASRSvehicle1792, the Queue1798, and the Combiner2 are free. I put those objects (figure) in one group "OPMP" and set the "OnContentChange" event to this group as shown in the attached figure. But this is not working. Would anyone help me to fix this please?

Regards.

Other (please specify)
Other
wait for eventgroup of objects
figure.png (230.8 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Patrick Zweekhorst avatar image
1 Like"
Patrick Zweekhorst answered sara S2 commented

Hi @sara S2,

From your description I assume the objects are "free" if they have no content? The wait for event activity waits for event1 OR event2 OR event3, not event1 AND event2 AND event3. If you set the wait for event such that you can wait for either object to become free, like I think you did, you will only need to include an extra decide activity. You wait till one of the objects becomes free, check with your decide if all 3 objects are free. If not go back to the wait for event, if all are free continue your process.
This is only one of the possible solutions, other solutions could for example be made by using lists

· 5
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

sara S2 avatar image sara S2 commented ·

@Patrick Zweekhorst, thank you for your reply.

As I mentioned, what I want to set is the event corresponding to: the ASRSvehicle1792 AND the Queue1798 AND the Combiner2 are free. I understand from your answer that is not possible to set the event "Free/Empty" to the group of the tree objects. I think that it is the same problem if I use an extra decide because tokens that are not verifying "decide" condition must wait for event. Then what is the event that I must set in this case?

Is it possible to fix this by a "code editor" in wait for event?

0 Likes 0 ·
tannerp avatar image tannerp sara S2 commented ·

@sara S2,

I recommend doing one of two things. The first is using an Acquire Resource or Pull from List activity, as they will only acquire or pull the items if the items are "free". It's built-in logic that makes more sense than using a Wait for Event.

The second way to do this would be to use a series of Wait for Event activities like shown below. Each Wait for Event listens for one of the objects (Queue, ASRS, Combiner) and the token only passes through all of them if they're all "free".

wait for events.fsm

1 Like 1 ·
sara S2 avatar image sara S2 tannerp commented ·

@tanner.p, thank you for your reply.

I tried this but it doesn't work because in the case I described above I can't set a delay. In addition the event must be: "the ASRSvehicle1792 AND the Queue1798 AND the Combiner2 are free at the same time" so that tokens wait in the same activity. Upon the event they move all and at the same time to "pull from list" (in order to apply the query by SC).

Before I try to use lists, I would like to know if it is impossible to set the event (" the ASRSvehicle1792 AND the Queue1798 AND the Combiner2 are free at the same time") using code editor for "object" and "event" in "wait for event" ?

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.