question

ejust avatar image
0 Likes"
ejust asked ejust commented

Stotage.Slot.Item error


Hi,
I can't handle this FlexScript exception in the attached model:
1702241504600.pngThanks in advance.

Current Layout_3.fsm

FlexSim 22.2.0
process flowstorage systemslotflexscript exception
1702241504600.png (11.0 KiB)
· 7
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·
@Mustafa Abdelnasser, your uploaded model didn't make it into your question. Please upload it again. Thank you!
1 Like 1 ·
ejust avatar image ejust Joerg Vogel commented ·

Hello @Joerg Vogel, thanks for your consideration.
I've uploaded the model again and a GIF for the error in case the model doesn't work properly again.
Current Layout_3.fsm
flexscript exception.gif

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ ejust commented ·
You've missed the model again -please just upload that without the gif.
0 Likes 0 ·
Show more comments

1 Answer

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered ejust commented

You have trailing whitespace in your entry for product type 10 in the "SKU" table. So any token that is querying for "Product type 10 " is not finding any slot items and the resulting label contains a NULL value which leads to errors in the subsequent activities.

In general you should make sure that a slot item was actually found before letting the token continue to activities that access this value.

· 6
5 |100000

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

ejust avatar image ejust commented ·

Thanks, @Felix, for your feedback. It would be a great help for me if you elaborate on how you debugged it though.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann ejust commented ·
I put a stop time shortly before the first error appears in the model and checked the token labels. The storageItem label said "no path" despite there being items of type 10 in the storage (and a manual query in the script console confirmed that the token should have found an item). So something had to be off with the query in the Process Flow and most often this comes down to a simple typo (lower case vs. upper case or like in this case, whitespace that is not visible on first glance).
1 Like 1 ·
ejust avatar image ejust Felix Möhlmann commented ·
Excellent! I appreciate you sharing this @Felix Möhlmann
0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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