question

Ruben Mariduena avatar image
0 Likes"
Ruben Mariduena asked Ruben Mariduena commented

How can I reference the TE that the dispatcher is currently using for a given process flow?

list-sync-dispatcher.fsm

I'm actually basing this question on my question and model from 10/10/16. Please see file attached, the only change that I did to the model was to add a dispatcher. Now that I have done that I have the issue that the task sequence given to a token referencing the object being used gets lost down the process. The problem is that since now they go to a list the "taskSequence" information becomes "NULL" and when I try to reference it later (in unload item from TE) it does not work. How can I reference the TE that has been executing all of the activities? is there a better way to do this? the only reason I'm using a dispatcher is because I want to dispatch the TE on first available basis to tasks.

Background information on the model that was explained in my previews question:

At first, tokens entering the process flow need to go through activities separately (each one is carrying information on their labels that affect the activities), but then they need to be "batched" (this is where the solution to my question last time was to use send to list), go through activities as a group (so the time taken in an activity is as a group not individuals) and then release them from the "batch" (list) while each one still carrying their corresponding information stored in their original token labels so they can go through their separate downstream processes

FlexSim 16.2.0
process flowlistsdispatcherte
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Sam Stubbs avatar image
1 Like"
Sam Stubbs answered Ruben Mariduena commented

When I run your model I don't even get to the unload activity, it gets hung up on exceptions related to your Wait For Event activity. I'm not exactly sure what you're trying to do in your model, so I didn't know what I should change.

In general though, if you're using a dispatcher just get "First Available" Instead, you can simply add your task executers to a group, and then assign that group to a resource. Whenever the Resource gets acquired, it will do so on a "First Available" basis by default, then you can get rid of the Dispatcher if that's all it's being utilized for.

Additionally, you can always get a reference to the object you're trying to unload from if you have a reference to the item being unloaded. Simply use the "up(object)" command, which just returns a reference to the container object you pass into it. For example, if I had a reference to the flow item on a label on my token called "item" I could write the command: up(getlabel(token,"item")) to return a reference to whatever the item's container is. In this case, the task executer.

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Ruben Mariduena avatar image Ruben Mariduena commented ·

It was getting stuck in the decision activity because I did not know how to reference the content in the current TE being used (had to be equal to 5 to continue with the activities). The Up command you showed me allowed me to do that. Now that I get a chance to analyze the issue downstream some more I realized that the token is losing reference to the "vessel/ts" it was attached to (the "taskSequence" label on the token goes to null once the token is pushed to the list) and it changes to a "NULL" value. Is there any way to reference the "vessel/ts" being used in the instance so it can be reassigned to the tokens? in my model I have multiple TE attached to the dispatcher and multiple queues sending TS so there's more than one active ts in the dispatcher.

list-sync-dispatcher.fsm

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.