question

Talia Z avatar image
1 Like"
Talia Z asked Talia Z commented

Route items based on whether or not a label exists

Hello! I am hoping to route items using decision points based on whether or not a label exists. I have created this model as an example - my aim is to route the box objects to Queue1 if they have the label 'destination' and to Queue2 if this label does not exist on the object. Thank you in advance.

FlexSim_route_based_on_label.fsm

FlexSim 20.0.10
decision pointsflexsim 20.0.10route
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
1 Like"
Joerg Vogel answered Talia Z commented
  1. objectexists(object.attrs.labels.subnodes[“labelname”])
· 5
5 |100000

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

Jon Abbott avatar image
1 Like"
Jon Abbott answered Talia Z commented

Great question! This can be accomplished using the assert method on the item destination label in decision point DP1's On Arrival trigger. This will attempt to retrieve the label value if it exists, and if it does not, it will create the label and set its value. Please take a look at the attached model and see if it meets your needs.

flexsim-route-based-on-label-ja.fsm


· 2
5 |100000

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