Jump to content

Node.Entered event fires before the node is actually entered?


WD0001

Recommended Posts

I have a process that is triggered by a node's Entered event.
image.png.ab5534c3a088bbbf46d07564bc624f89.png

image.png.f052ce371fc019afb974beeb9caf4dbd.png

However, it throws this error, because the entity's current location is actually still on the inbound link at the time the event is fired.
image.thumb.png.418316c52b47cd12f5ab46a011b3b376.png

If I execute it as an add-on process instead, then it works.
image.thumb.png.98e8a3c1d8a535e5a31743d84bc010a5.png

The entity's current location is actually still on the inbound link at the time of the event.
I can confirm this by changing the expression to show the link's name instead.
image.png.0e28c083af843c1fea3efe75b7d8f0b9.png

Looking at the node's OnEntered process, EnteredAddonProcess executes immediately after EnteredEvent.
image.png.88ab9e3351f618c50af8d05ad607b0c9.png

Is this a bug?
I am using Simio 15.252.31775 (64 bit)

Edited by WD0001
Link to comment
Share on other sites

I came across with that before, and it is a bit confusing. I'm using version 15.240.27700

I learned that you shouldn't use this Entered Event to control the entity either. For example, If you put a delay on it, the entity will not stop for the delay time.

If you trace it, you see that Entered Event is fired, but the process is not executed right away. Instead EnteredAddonProcess is executed before. 

image.thumb.png.8149296c2f84079ebde5b096fc46138c.png

Not only EnteredAddonProcess is executed before, but the entire logic is executed, so it executes ToOutboundLink before executing the process activated by the EnteredEvent.

image.thumb.png.fd4ff37cc60a68c0d35b58157d8d84bf.png

The reason it works on EnteredAddonProcess is because the token stops there, executes the addon process, then continue. With the Entered Event, the token does not wait.

image.thumb.png.08499f75ed9a1442f45aeca4c9d5a825.png

Link to comment
Share on other sites

×
×
  • Create New...