OnMessage in wait for event

OnMessage in wait for event

shanice_c
Not applicable
9 Views
2 Replies
Message 1 of 3

OnMessage in wait for event

shanice_c
Not applicable

[ FlexSim 21.2.0 ]

Hello everyone, I have two process flows. I'd like to release token waiting in flowA by sending message from flowB. The token in flowA is kept in a wait for event activity and listen to onMessage.

It seems the token is releases but my model has exceptions below. How could I fix it in wait for event activity?1643545501811.png

testonMessage (1).fsm

0 Likes
Accepted solutions (1)
10 Views
2 Replies
Replies (2)
Message 2 of 3

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

The problem is not in the WaitforEvent activity, it's in the ill-defined Assign And Send Message.

1643550579514.png

Your 'toObject' is NULL since it's the second, optional parameter that requires the activity name - not the first. The instance to use in gettoken() would not be "current", and also the token is likely unable to handle the message anyway.

Synchronisation like this is better done using lists - I recommend you try that.

Message 3 of 3

ryan_c10
Not applicable

Hi @fiona.c, 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