You are trying to read the label "Type" on an object (node) that does not exist. In your model this happens because at the time when unloading items of type 2 or 3, previously unloaded items might already have been destroyed. But because the (empty) entry in the array "item1" persists, a token is created for that empty entry in the subflow and then tries to read the label to determine whether it should be unloaded - which triggers the error.
You should remove unloaded items from the array or add a Decide activity to the start of the subflow that first determines whether "token.item1[token.Rank]" actually points at a valid object ("objectexists(...)").
Another tip: In general you should be careful when using the "Label Access On Parent Only" option. If the subflow token only needs to read labels then this is safe. But any label it writes to will be updated/created on the parent token. So when the first token sets "Destination" to Queue1 for example, the second token might change this to Queue2. In your case the timing works out that this is not an issue but it easily could be if you wanted to access the destination again later, after some time has passed.
I'll attach an adjusted version of your model that removes unloaded items from the array and handles the labels a bit differently to be hopefully more robust.
13 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved