question

dong avatar image
0 Likes"
dong asked Logan Gold commented

Process flow can't retrieve item labels.

Hello everyone, my issue is that I am using a process flow to generate an item in the queue and assign a label to it. I also use an Event-triggered source to generate a token when the item enters the queue. However, I am unable to retrieve the label value from the token's item. Thank you all for your help!test0917.fsm

FlexSim 24.2.1
processs flowtokens
test0917.fsm (31.2 KiB)
· 1
5 |100000

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

Logan Gold avatar image Logan Gold ♦♦ commented ·

Hi @dong, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

Every event in FlexSim has "event data" values attached to it. For the On Entry event these are the entering item and the port through which it enters.

In the Event Triggered Source you can do one of two things with this data:

1) Assign it to a label

2) Compare it to a given value, only creating a token if they match

You need to do the first, so you have a reference to the item and can then read its labels (or other properties) through the dot syntax.

1726579586887.png

In your model the timing also doesn't currently. The Event-Triggered Source reacts immediately when the item is created in the queue and before the label is assigned to it.

Use the label assignment in the Create Objects activity, so the label is already present when the On Entry event fires.

1726579703002.png


1726579586887.png (16.5 KiB)
1726579703002.png (17.2 KiB)
5 |100000

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