question

Borja Lorenzo avatar image
0 Likes"
Borja Lorenzo asked Felix Möhlmann answered

Lists as a task list without links to the input instances

Hello,

I wanted to understand how the push and pull operations work on the list. If I don't place a breath in the push to the list, I get a node error...

time: 2.000000 exception: FlexScript exception: Retrieving Inf1 label property on node that does not exist at MODEL:/Tools/ProcessFlow/ProcessFlow/Assign Labels>labels/1/2 at line 0


What I understand happens is that the token is destroyed before being able to assign the label to the token that does the pull.

My goal is to use this list as a live record of pending tasks. These are pushed by tokens that would read data from a global table. The tasks are extracted by another independent token and flow. If I want to collect information from any of the labels that the puller token carries, I can't if I delete it or if the deletion and label assignment happen at the same time.

Can lists be created that do not depend on the elements that create them, such as tokens, items, etc., but only as records that come in and out? If we didn't have a label on the token that does the push to serve as a key, we could have an auto-increment ID like in databases. This way, the token that does the pull removes the task and takes the information from the fields registered in the list.

Can the list be configured to work with this concept, or must they always be linked to the element that made the entry?


ejemplo Pull_Push to List.fsm

FlexSim 24.1.1
pull from listglobal listpush to listlocal list
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

Push values independently by push argument. Entry value can be then anything.

https://docs.flexsim.com/en/25.0/Reference/Tools/GlobalLists/Fields/Fields.html#adding

example:

Universal_list_by_pusharguments.fsm

Edit: if you want to keep your data, even if tasks are done, then convert the data into string datatype. By this you break the references to pointer objects.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered

You can push anything to the list, including for example simple numerial values. Since the task information is probably going to be more than a single value, you could write all information to an array and push that to the list. The token that triggers the push is then not needed at all afterwards. Note: By default lists are set to only allow unique values. If you want to push the same array of values to the list multiple times you have to uncheck the "Unique Values Only" option in the list properties.

You can also keep the current setup with labels on a token and retrieve the label values in the moment when the pull happens by using the SELECT statement.

Or you just add a Breathe, as you already figured out.

ejemplo-pull-push-to-list_1.fsm


5 |100000

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