<?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: Task Sequence losing &amp;quot;drop from list&amp;quot; reference in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/task-sequence-losing-quot-drop-from-list-quot-reference/m-p/13532314#M40952</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;It's the case where the pull is unsuccessful but you leave a backorder on the list. Then when the backorder is fulfilled this trigger is fired again. You no longer have a callback handler in your code so it can't do anything with that anyway. Drop a new task executer in a model and add a PullFrom List option to the Load Trigger and you'll see the differences between your code and the standard trigger option.&lt;/P&gt;&lt;P&gt;Perhaps you could describe the intention behind what you're doing and we can advise you on the approach more generally.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 07 Jul 2022 13:38:41 GMT</pubDate>
    <dc:creator>jason_lightfoot_adsk</dc:creator>
    <dc:date>2022-07-07T13:38:41Z</dc:date>
    <item>
      <title>Task Sequence losing "drop from list" reference</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/task-sequence-losing-quot-drop-from-list-quot-reference/m-p/13532311#M40949</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 22.1.2 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;I am having problems with a bus routing model. The model is designed to pickup people at various bus stops and drop them off based on a bus route loop. The only way I've been able to get this to work is with Task Sequence Lists. I don't like working with these, but the functionality is great if you can get them to work.&lt;/P&gt;
 &lt;P&gt;I am getting the following error:&lt;/P&gt;
 &lt;P&gt;time: 243.000000 exception: FlexScript exception: Invalid down cast. Object is not an instance of the target type. at MODEL:/Bus1&amp;gt;variables/loadtrigger i: MODEL:/Tools/GlobalLists/TSList1/26/onFulfill/1&lt;/P&gt;
 &lt;P&gt;And have narrowed it down to this variable in a trigger in which I am pulling task sequences:&lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1657134244918.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1511327i759B45E3C1B400F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="1657134244918.png" alt="1657134244918.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;I think the model is losing the reference to the task sequence and then cannot find it when it goes to drop the task sequence. This seems to happen when it grabs a task from the onResourceAvailable trigger and then more tasks are added to the task list before it can unload all of the items it loaded. I'm fine with the error just persisting but it seems to be creating artifacts to where certain tasks in the task list get left on the list and never executed (once per error). I would guess this is the task the bad reference points to when the drop task from list fails.&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;I have attached the file I'm working with. Let me know if anything needs clarification.&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/54671-bus-example.fsm" target="_blank"&gt;Bus Example.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 06 Jul 2022 19:11:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/task-sequence-losing-quot-drop-from-list-quot-reference/m-p/13532311#M40949</guid>
      <dc:creator>kyle_p1</dc:creator>
      <dc:date>2022-07-06T19:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Task Sequence losing "drop from list" reference</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/task-sequence-losing-quot-drop-from-list-quot-reference/m-p/13532312#M40950</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;I would change current to be Object and then have a new local variable called te for the TaskExecuter task - but even if you do that you'll still have the problem that param(1) isn't a valid item when the trigger is called in the Callback case.  You could put the test for callback case before you assign the item variable.&lt;/P&gt;&lt;P&gt;This is a purely technical answer - I've not looked into how or why you're doing what you are.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 06 Jul 2022 21:54:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/task-sequence-losing-quot-drop-from-list-quot-reference/m-p/13532312#M40950</guid>
      <dc:creator>jason_lightfoot_adsk</dc:creator>
      <dc:date>2022-07-06T21:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Task Sequence losing "drop from list" reference</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/task-sequence-losing-quot-drop-from-list-quot-reference/m-p/13532313#M40951</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 What is the Callback case doing? Seems like it's listening for an event, but I'm not sure what event and why.
&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 Jul 2022 12:11:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/task-sequence-losing-quot-drop-from-list-quot-reference/m-p/13532313#M40951</guid>
      <dc:creator>kyle_p1</dc:creator>
      <dc:date>2022-07-07T12:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Task Sequence losing "drop from list" reference</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/task-sequence-losing-quot-drop-from-list-quot-reference/m-p/13532314#M40952</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;It's the case where the pull is unsuccessful but you leave a backorder on the list. Then when the backorder is fulfilled this trigger is fired again. You no longer have a callback handler in your code so it can't do anything with that anyway. Drop a new task executer in a model and add a PullFrom List option to the Load Trigger and you'll see the differences between your code and the standard trigger option.&lt;/P&gt;&lt;P&gt;Perhaps you could describe the intention behind what you're doing and we can advise you on the approach more generally.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 Jul 2022 13:38:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/task-sequence-losing-quot-drop-from-list-quot-reference/m-p/13532314#M40952</guid>
      <dc:creator>jason_lightfoot_adsk</dc:creator>
      <dc:date>2022-07-07T13:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Task Sequence losing "drop from list" reference</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/task-sequence-losing-quot-drop-from-list-quot-reference/m-p/13532315#M40953</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 I got it working by not pushing the ts query to a backorder for the load operation. If there is no item to load then the ts is handled by the onResourceAvailable trigger. Thank you for your help!
&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 Jul 2022 14:54:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/task-sequence-losing-quot-drop-from-list-quot-reference/m-p/13532315#M40953</guid>
      <dc:creator>kyle_p1</dc:creator>
      <dc:date>2022-07-07T14:54:56Z</dc:date>
    </item>
  </channel>
</rss>

