article

Paul Toone avatar image
0 Likes"
Paul Toone posted Jason Lightfoot commented

Entry Exit Trigger   

Overview:

Entry Trigger: This function is executed each time a flowitem enters this object.

Exit Trigger: This function is executed each time a flowitem exits this object.

Note on entry/exit trigger context: Generally, the entry and exit triggers are executed at the very beginning of the OnReceive/OnSend event of an object, before any other logic is executed. This means that you can change the object's variables, labels, etc., and have those changes be applied correctly within the event logic. However, executing commands that may affect further events of the object should not be executed in the entry/exit trigger, because some events have yet to be created in the event logic of the object, and functions which affect the object's events should wait until those events have been created. In such a case you should send the object a delayed message in 0 time (using the senddelayedmessage() command), and then execute the functionality from the message trigger. This allows the object to finish the rest of its event logic before your commands are executed. Commands which apply in this setting are stopobject(), requestoperators(), openoutput(), openinput(), resumeinput(), resumeoutput(), and in some cases the creating and dispatching of task sequences, depending on the types of tasks that are in them.

Access variables:

current: the current object

item: the involved object that just entered/exited

port: the number of the port that the object came/left through



flexsim users manualusers manual
· 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.

Hoang Nk avatar image Hoang Nk commented ·

Hi,

I'm having a thousands objects that I would like to add a same Entry Trigger to, is there any way that I could do it at once?

Thanks,

Hoang

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Hoang Nk commented ·

You want one entry event? Put them all in a container flowitem and have that enter instead.

0 Likes 0 ·
Hoang Nk avatar image Hoang Nk Jason Lightfoot ♦♦ commented ·

for example I have 1000 Queue objects and I would like to set the On Entry to each of them so that it will rotate the flow item at a 90-degree angle.

0 Likes 0 ·
Show more comments

Article

Contributors

paul.t contributed to this article

Navigation

FlexSim 2016.1