Unable to pull first item from list

Unable to pull first item from list

giovanni_ceroni2
Contributor Contributor
540 Views
6 Replies
Message 1 of 7

Unable to pull first item from list

giovanni_ceroni2
Contributor
Contributor

[ FlexSim 25.0.2 ]

I have a process that creates pallets in specific locations and boxes in each pallet according to gllobal tables. Then it put every token per line of order in a list of orders. the process should pull the first order and copy its OrderID, but it doesn't work as intended the value is null and says no path to firstPulled.

QUESTION LIST.fsm

0 Likes
Accepted solutions (1)
541 Views
6 Replies
Replies (6)
Message 2 of 7

Paula_LG
Advocate
Advocate
Accepted solution

Hi,

The problem here is that the firstPulled token is destroyed immediately after being pulled from the list (Finish activity). It can be solved by adding a breathe activity between Push to List and Finish, so that when you try to copy the orderID, the token still exists:

1744622584549.png

I hope it helps!

question-list.fsm

0 Likes
Message 3 of 7

giovanni_ceroni2
Contributor
Contributor

Thank you very much, now it writes the orderID.

I tried connecting the paths i disconnected to test these and now it says error in the travel task. Why?


question-list.fsm

0 Likes
Message 4 of 7

Paula_LG
Advocate
Advocate

You're asking the operator to travel to an object named "AJSHB" (token.CodArticolo), which does not exist.

0 Likes
Message 5 of 7

giovanni_ceroni2
Contributor
Contributor

Yes, thank you. Now it works but only for the first line of order. The next line is null. Why is it? i don't understand


question-list.fsm

0 Likes
Message 6 of 7

Paula_LG
Advocate
Advocate

The second time the sub flow is run, the pulled tokens don't exist anymore. If you want to use any information on those tokens for your logic, you need to gather it right after you pull them, before they are destroyed. You can save it on a label, just as you did with the orderID.

question-list.fsm

0 Likes
Message 7 of 7

giovanni_ceroni2
Contributor
Contributor
Thank you very much!!

now it works

0 Likes