question

Justin Brozzo avatar image
0 Likes"
Justin Brozzo asked Adrian Haws edited

Is it possible to "delete" and object or simply remove and object from a queue if an object is sent to a different queue.

I am trying to figure out the best way to remove and object from a queue or several queues when an object from a main line is sent to a reject queue... Is this possible?

Thanks!!!!

FlexSim 16.1.1
queuedestroy objectremovalqueue connection
· 1
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 Joerg Vogel commented

It sounds like you have flowitems that have associations with other flowitems in your model. When a flowitem is rejected, you want the other flowitems to leave their queues and also be rejected. As long as you have references all of the associated flowitems, then it's just a bit of code.

For example, you could put code into the OnEntry of your 'reject' queue that would remove the associated flowitems from their respective queues using:

  1. moveobject(getlabel(item, "myPartner"), node("RejectQueue", model()));
  2. or
  3. destoyobject(getlabel(item, "myPartner"));

You could also do it in Process Flow by having an Event-Triggered Source listening to the OnEntry of the Queue and then doing a Move Object or Destroy Object activity for each of the associated flowitems.

If instead you know which item is moving, but not where he will be considered 'rejected', you can also use Process Flow to listen to the On Entering or On Exiting of your Flowitem. In this case you would create a token when the item you want to listen to is created. Then use a Wait For Event to listen to that flowitems entering or exiting events. You can even have the Wait for Event match to a specific object the flowitem is entering/exiting.


rejectpf.png (5.2 KiB)
rejectpf2.png (10.0 KiB)
· 3
5 |100000

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