question

Cindy avatar image
0 Likes"
Cindy asked Jeanette F commented

How to know if a list is empty in processflow

In my model i need to decide if there are items in a list that i have in process flow, if the list is empty to follow a different process an if it is not then to pull the item form the list, how can i write that condition in the decide?

1708963477874.png

I have this structure, and i also have the lists in another process

1708963523143.png

But how can i do to put in the condition that if there is something in list RBC1 pull form list and if there is not then do another thing?

FlexSim 23.0.0
processs flowconditionalusing lists
1708963477874.png (23.4 KiB)
1708963523143.png (34.4 KiB)
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Cindy, was Paula LG's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Paula LG avatar image
2 Likes"
Paula LG answered Paula LG edited

Hi Cindy,

What you want to do can be accomplished without asking if the list has any items in it.

The "Pull from List" activity itself has a feature called "Use Max Wait Timer". It is used so that the token stays in the activity for the number of seconds you specify and, if it's not able to pull anything from it, it is released through the specified port.

You can enable the max wait timer in all your pull activities with a time of 0 s and, if the list is empty, the token won't pull anything and will be released through another port of your choosing. It should look like this:


1708964526933.png

I hope it helps!


1708964526933.png (60.1 KiB)
5 |100000

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