question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Logan Gold commented

Wait For Event Not Working Based On ID Match?

Hi Team,

I want to match ID before releasing token from wait for event. I have applied condition but still it is not working.

Can you help me to identify problem here?

Thank you!

4. WaitForEventCheck.fsm

FlexSim 20.0.10
conditionwaitforevent
· 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 @Ankur A3, was Jason Lightfoot'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 unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Ankur A3 commented

You can only match on the fields you have, so use the one for 'Token'.

1651244524512.png

Model attached.4-waitforeventcheck_jl.fsm

Or you can use the Synchronise or Join activities.


· 9
5 |100000

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

Ankur A3 avatar image Ankur A3 commented ·

Hi @Jason Lightfoot

Thank you for your answer!

Can you explain little bit more? What do you mean by field here since I am having the label ID on both the token in parallel? Is it not possible to match based on label "ID" value?

What is purpose of using token.children[1]?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Ankur A3 commented ·
I've seen many posts which are replies to answers to be posted as fresh answers - do you think you could try to reply to an answer as a comment in the furture? Thank you.
1 Like 1 ·
Ankur A3 avatar image Ankur A3 Jason Lightfoot ♦ commented ·
Thank you @Jason Lightfoot


Sure.

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Ankur A3 commented ·
I just meant the fields in the Label Matching/Assignment table as shown. There isn't one for ID of the token, so you can't match on it.

Your split creates a child token, so the way of getting a reference to it is using token.children[1].

0 Likes 0 ·
Ankur A3 avatar image Ankur A3 commented ·

@Jason Lightfoot

I have 1 more question if I can.

I have to use wait for event in both the split branch. It is working in 1 branch as we discussed. What changes are required if we want to make it work for other branch also?

Thank you!

4-waitforeventcheck-jl_2.fsm

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Ankur A3 commented ·

Then you use token.parent on the child token and you need to turn allow label access on the child tokens, since both now have a label called otherToken. That's an option on the split activity.

Again, the synchronise activity would do this too, but then that forces your process layout to merge at the sync. activity.

4-waitforeventcheck-jl2-2.fsm

0 Likes 0 ·
Ankur A3 avatar image Ankur A3 Jason Lightfoot ♦ commented ·

@Jason Lightfoot

I am facing some issues in model after making changes as discussed.

Can you help me out?

Thank you!

6. SplitTokenDoubt.fsm

0 Likes 0 ·
6-splittokendoubt.fsm (114.9 KiB)
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.