question

Diana Lubow avatar image
2 Likes"
Diana Lubow asked Brandon Peterson edited

Pull by time on list

I have a list of customer requests. I want to start pulling requests when at least one of the requests has been on the list for at least 15 minutes. Then I want to pull all of the requests that have been there for 10 minutes or more. The remaining requests and new requests will wait until at least one request has been there 15 minutes, then pull everything that\'s been there 10 minutes or more, etc.

Is there a way to do this with one "Pull from list" activity? I've been reading the user guide and trying various things but I haven't figured out a good way to do this.

FlexSim 16.0.1
process flowquerypull from listlists
5 |100000

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

Brenton King avatar image
5 Likes"
Brenton King answered Brandon Peterson edited

I would think to do it with two pull from lists. You may want a list puller flow on its own that loops around and around doing the pulling.

You would need a field on your list that has age of the tokens on the list.

On the first "Pull From List" activity enter 1 for the "Request Num" and "Require Num" then enter the following in the "Query" field:

WHERE age >= 15 ORDER BY age DESC 

On the second "Pull From List" request the upper limit you have, and require 1. Then for the Query enter:

WHERE age >= 10 ORDER BY age DESC 
· 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.

Brandon Peterson avatar image Brandon Peterson ♦ commented ·

This is a great answer!

It may not be an issue for you but with this solution there is the possibility that you will not have an item on the list that has been there longer than 10 minutes when you reach the second Pull From List activity. In order to keep from waiting in the second Pull From List activity I would do one of two things:

  • My first option would be to check "Leave entries on List" for the first Pull From List activity so that only the second Pull From List will remove the entries.
  • My second option would be to use a max wait time of zero on the second Pull From List activity.

I like the first option better because it keeps the array of pulled entries more straight forward.

Good Luck Diana!

4 Likes 4 ·
jing.c avatar image
0 Likes"
jing.c answered

I am not familiar with ProcessFlow yet. But I try to only use List (not ProcessFlow) to do it.

In the model attached I will send a 15s delay message to Queue4 when item comes into Rack5. You can see the code which I copy from "pull from Item List" in trigger Pull Strategy and also add a delay message when pullitem() works to pull all the item have been there for 10 or more second.

Of course I add a ItemList in Tools first, and the Query I use is

WHERE age >= 10 ORDER BY age DESC

pullbytimeonlyuselistv16.fsm


5 |100000

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