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.
I am getting the following error:
time: 243.000000 exception: FlexScript exception: Invalid down cast. Object is not an instance of the target type. at MODEL:/Bus1>variables/loadtrigger i: MODEL:/Tools/GlobalLists/TSList1/26/onFulfill/1
And have narrowed it down to this variable in a trigger in which I am pulling task sequences:
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.
I have attached the file I'm working with. Let me know if anything needs clarification.