Delete all tokens of a process flow

Delete all tokens of a process flow

guillaume_m2
Not applicable
427 Views
1 Reply
Message 1 of 2

Delete all tokens of a process flow

guillaume_m2
Not applicable

[ FlexSim 20.0.10 ]

Hello,

Is it possible to delete all tokens of a process flow on specific event ? My FlexSim model is connected to a secket server. When I receive particular message, that means that we shoud "reset" all activities (without resetting the model and the simulation). I'm able to detect that message, but I don't know how to delete the tokens of the targeted process flow.

Thank you.

0 Likes
Accepted solutions (1)
428 Views
1 Reply
Reply (1)
Message 2 of 2

regan_blackett
Autodesk
Autodesk
Accepted solution

One way you could do this is at the start of your regular process flow, allow all your tokens to enter a Zone and let the tokens exit the zone at the end of their natural process.

Then I would use an event triggered source to listen to an event that will trigger the removal of the tokens. After the event triggered source creates its token, I would use an assign label activity to assign a label to the token that gets all a reference to all the tokens in the zone (under the "value" of the label choose, Token>Tokens in Shared Asset and reference your Zone).

Then you can use a Release Tokens activity to send the tokens referenced in that label to a sink that has the "deallocate shared assets" check box checked. This will force the tokens out of the Zone and Their respective activities and let them be deleted by the sink activity.

Attached is an example of model of what that could look like.

deletetokensonevent.fsm

0 Likes