Assign token label value decide by object in group

Assign token label value decide by object in group

anutt_k
Not applicable
33 Views
2 Replies
Message 1 of 3

Assign token label value decide by object in group

anutt_k
Not applicable

[ FlexSim 22.2.2 ]

Hello. I want to create logic for decide to acquire difference resource. Want to conditional by object in groups.

1667213659518.png

From attached model. I have 3 Queue and create 3 groups for each 3 Queue per group like the picture and add 1 group for all Queue name "All".

I have global list as name "Queue" it has initial content as member of Group : All inside.

In process flow it will pull from list "Queue" and assign value of token.pulled as Queue1, Queue2, ...... Queue9 .

Then I want to assign label after pull from list : Queue. Like this.

if : token.pulled = Queue1 or Queue2 or Queue3 (Queue in Group 1)

new label will has value = 1 .

if : token.pulled = Queue1 or Queue2 or Queue3 (Queue inGroup 2)

new label will has value = 2 .

if : token.pulled = Queue1 or Queue2 or Queue3 (Queue inGroup 3)

new label will has value = 3 .

The purpose is use difference Operator by each group of queue.

I will attached file here. Thank You so much.

Answer1.fsm

0 Likes
Accepted solutions (1)
34 Views
2 Replies
Replies (2)
Message 2 of 3

Jacob_White
Community Manager
Community Manager
Accepted solution

Hi @Anutt K,

One way that you could do this is by adding a label on the queues that refer to which group they are in, 1,2,3 etc...

You can then use this label to decide where the token that pulled that queue from the list will go. In the model that I am attaching, I set a label called "Group" on each of the queues with a corresponding value of 1,2, or 3. Then in the decide activity I sent the tokens to the port 1, 2, or 3 based on the value of token.pulled.Group. This works because pulled is a pointer reference to the queue and by adding the ".Group" to the end of that pointer you will get the label value "Group" from that queue.

answer1_JW.fsm

0 Likes
Message 3 of 3

anutt_k
Not applicable

thank You. I get it.

0 Likes