question

Kari Payton avatar image
0 Likes"
Kari Payton asked Matt Long answered

Why doesn't a wait for event work in preemption?

I set up a preemption with no issues if I use a standard delay. However if I change that delay to a "wait for event" I get the following error:

time: 34.588096 exception: Exception caught in start() of activity "Save Context" in "ProcessFlow". Continuing throw... time: 34.588096 exception: Exception caught in evaluation of /Tools/ProcessFlow/ProcessFlow/Fly Blade>stats/instances/ProcessFlow/onEntry

Can anybody explain why this is? I am using this because I don't know when the triggering event will occur, but when it does I need the tokens in the zone to pause until that specific event is finished.

FlexSim 17.0.3
wait for eventpreemption
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

·
Matt Long avatar image
0 Likes"
Matt Long answered Kari Payton commented

Since you haven't shared your model, it's impossible to know exactly what is causing the issue, however, if I had to guess, you probably don't have a Breathe immediately after your Wait For Event. A breathe meaning a Delay activity with a delay time of 0. This is often needed when using Wait for Event or Event Triggered Source (or at times after task sequence activities) in order to break up code that is being executed both by the firing event, and the Wait for Event. If your Wait for Event starts messing with objects or tokens that were involved in the triggering event, it can change the state of an object or the model that it isn't expecting and cause exceptions to be thrown.

5 |100000

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

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.