<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Wait for event activity in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/wait-for-event-activity/m-p/13549408#M54396</link>
    <description>&lt;P&gt;Ok, it works perfectly. Thank you.&lt;/P&gt;
&lt;P&gt;But now I have a new problem: is there a way to fired the token from the "wait for event" activity once at time, after the label changed value?&lt;/P&gt;
&lt;P&gt;If I have 3 token on the "wait for event" activity when the label change all 3 tokens are fired. I would like that only one at time is fired by the activity. Is it possible to fix?&lt;/P&gt;</description>
    <pubDate>Wed, 29 Aug 2018 07:38:27 GMT</pubDate>
    <dc:creator>marco_b8</dc:creator>
    <dc:date>2018-08-29T07:38:27Z</dc:date>
    <item>
      <title>Wait for event activity</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/wait-for-event-activity/m-p/13549406#M54394</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 17.2.5 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;I have some problem with the "wait for event" activity. In my model I create 2 type of token that I send in 2 different way. In one way I assign a tracked variable "value" to the token (initialized to 0) and send it to "wait for an event" which get free the token when the variable reach the value 2. In the other way I increment the variable. Why when the variable "value" change, the "wait for event" activity do not release the token?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 08:07:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/wait-for-event-activity/m-p/13549406#M54394</guid>
      <dc:creator>marco_b8</dc:creator>
      <dc:date>2018-08-21T08:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Wait for event activity</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/wait-for-event-activity/m-p/13549407#M54395</link>
      <description>&lt;P&gt;Tokens do not have the "OnLabelValueChanged" event. Instead, you need to listen to the TrackedVariable's OnChange event. In the WaitForEvent, sample the OnChange of one of the Tracked Variables in the toolbox. Then change the Object field to say&lt;/P&gt;&lt;PRE&gt;token.labels["value"]
&lt;/PRE&gt;&lt;P&gt;This will make the Wait For Event listen to the correct event.&lt;/P&gt;&lt;P&gt;However, you will also need to change the value of that token's Tracked Variable. You will need to get a reference to the token that owns the value label, and then set that label value.&lt;/P&gt;&lt;P&gt;Here is an update version of the model that demonstrates this approach.&lt;/P&gt;&lt;P&gt;&lt;A id="13998" href="https://answers.flexsim.com/storage/attachments/13998-provawait-fixed.fsm"&gt;provawait-fixed.fsm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 16:04:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/wait-for-event-activity/m-p/13549407#M54395</guid>
      <dc:creator>JordanLJohnson</dc:creator>
      <dc:date>2018-08-21T16:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Wait for event activity</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/wait-for-event-activity/m-p/13549408#M54396</link>
      <description>&lt;P&gt;Ok, it works perfectly. Thank you.&lt;/P&gt;
&lt;P&gt;But now I have a new problem: is there a way to fired the token from the "wait for event" activity once at time, after the label changed value?&lt;/P&gt;
&lt;P&gt;If I have 3 token on the "wait for event" activity when the label change all 3 tokens are fired. I would like that only one at time is fired by the activity. Is it possible to fix?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 07:38:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/wait-for-event-activity/m-p/13549408#M54396</guid>
      <dc:creator>marco_b8</dc:creator>
      <dc:date>2018-08-29T07:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Wait for event activity</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/wait-for-event-activity/m-p/13549409#M54397</link>
      <description>&lt;P&gt;Put a Zone or a Resource around the Wait for Event, to restrict access to that activity.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 18:30:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/wait-for-event-activity/m-p/13549409#M54397</guid>
      <dc:creator>JordanLJohnson</dc:creator>
      <dc:date>2018-08-29T18:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Wait for event activity</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/wait-for-event-activity/m-p/13549410#M54398</link>
      <description>&lt;P&gt;Really thank you for your help and your support. &lt;/P&gt;
&lt;P&gt;I have only the last (I hope) question: the "wait for event" now works well in case I have only 1 token in the process flow. If I have more than one that pass in this activity, flexsim send me the "exeption" that there is an error in the trigger event of "wait for event".&lt;/P&gt;
&lt;P&gt;I tried to change the object of the "wait for event" from &lt;STRONG&gt;gettokenbyid(1) &lt;/STRONG&gt;in &lt;STRONG&gt;gettokenbyid(current) &lt;/STRONG&gt;but it is not the right solution.&lt;/P&gt;
&lt;P&gt;Can I ask your help again? Really thank you!&lt;/P&gt;
&lt;P&gt;I'm attaching the model with the "zone" activity in which only 1 token at time can enter.&lt;/P&gt;
&lt;P&gt;&lt;A id="14135" href="https://answers.flexsim.com/storage/temp/14135-wfe-problem.fsm"&gt;wfe-problem.fsm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 15:09:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/wait-for-event-activity/m-p/13549410#M54398</guid>
      <dc:creator>marco_b8</dc:creator>
      <dc:date>2018-08-30T15:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Wait for event activity</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/wait-for-event-activity/m-p/13549411#M54399</link>
      <description>&lt;P&gt;I looked at the model, but it didn't throw any exceptions, and I don't understand what you are trying to do, other than listen to a label value. Can you describe why you want to listen to a label?&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 14:47:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/wait-for-event-activity/m-p/13549411#M54399</guid>
      <dc:creator>JordanLJohnson</dc:creator>
      <dc:date>2018-08-31T14:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Wait for event activity</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/wait-for-event-activity/m-p/13549412#M54400</link>
      <description>&lt;P&gt;Hi Jordan, sorry for this late reply. At the end I have change my full model to solve the problem.&lt;/P&gt;
&lt;P&gt;Thanks again for all your support!!!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 11:31:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/wait-for-event-activity/m-p/13549412#M54400</guid>
      <dc:creator>marco_b8</dc:creator>
      <dc:date>2018-09-05T11:31:29Z</dc:date>
    </item>
  </channel>
</rss>

