question

K_yun avatar image
0 Likes"
K_yun asked K_yun edited

Query problem with Pull From List

query-problem-with-pull-from-list.fsm

Hi , i upload a small model here for some help.

As you can see in the model, the source1 creates items with type1\type2\type3, each type has it's own processflow numbers. I want to pull two items a time with the same processflow number(range from 1 to 4, not specified but must stay the same) and whose type is 3.But i don't know how to set the Pull From List activity.

And How to implement this through custom code?

Thanks advance for any instruction.

FlexSim 19.2.3
querypf
01.png (21.1 KiB)
02.png (59.0 KiB)
03.png (7.8 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.

1 Answer

tannerp avatar image
1 Like"
tannerp answered K_yun edited

Hi @meng L,

After reviewing your question, I think it might be easier to use two Pull from List activities rather than custom coding this. I've created an example that pulls one item, checks its ProcessFlow label, and then pulls a second item with the same label. I think this is easier than writing code that will predict the ProcessFlow label value and pull two of the same.

Here's an example:

The first Pull from List activity pulls based on Type = 3 and assigns the pulled item to a label "pulled".

The next step is not necessary, but it makes this intermediate move make more sense. I use an Assign Labels activity to check the ProcessFlow label of the item that was pulled and I assign it to the token label "PF" (to avoid confusion).

The second Pull from List activity then queries based on Type = 3 and matching the ProcessFlow label to the token's label "PF". Note that the "puller" could be anything that you assign it to be. I just left the default values.

To verify that it's working, I then move the items in pairs into a second queue. Hopefully this helps. Let me know if it works for you.

pull-pairs-list.fsm


first-pull.png (21.8 KiB)
pf-label.png (8.9 KiB)
puller-pf.png (16.7 KiB)
pull-pairs-list.fsm (31.0 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.

K_yun avatar image K_yun commented ·

This is the way i can do, thank you tanner @tanner.p

0 Likes 0 ·