article

Natalie White avatar image
0 Likes"
Natalie White posted Natalie White commented

Defining a Sequence of Jobs Using a Global Table

This model demonstrates a method of giving a task executor a set of tasks (or jobs) to accomplish in a specific sequence by referencing information stored in a global table.

In this case, an operator needs to move boxes between queues in a very specific order.

1692225896402.png

The global table defines the order of operations, with each row representing one job. The row contains necessary information about the job: the item to be moved and its destination. These jobs are to be carried out in order, row by row.

1692225914472.png

First, Product1 will be moved to Queue1, then Product2 to Queue2, Product3 to Queue3, Product1 to QueueOut, and so on and so forth. Any modifications made to this table will directly modify the model’s behavior.

The logic behind the process flow is relatively simple: a single token loops through a task sequence, with the operator completing a job with every loop. Assign Labels activities are used to get information about the job from the global table and attach that information to the token.

1692225936471.png

The “Assign Labels: Get Table Data” activities reference the current row in the global table to access and store information about the current job (the item name and its destination).

The “Assign Label: Item” activities use custom code to search through a group containing all the queues in the model until it finds the item matching the item name from the global table.

1692225974775.png

The task sequence directs the operator to travel to the item’s queue, load the item, travel to the destination, and unload the item. The token’s labels contain the information that is needed for these activities. After this sequence is completed, the label “row” is incremented so that the next row in the table will be used for the following job.

Although this demo model shows an operator moving boxes between queues, this method of acquiring data from global tables to define an order of operations can be used in a variety of other applications.

GlobalTableDemo.fsm

global tabletask sequenceorder of execution
1692225896402.png (120.8 KiB)
1692225914472.png (61.6 KiB)
1692225936471.png (80.8 KiB)
1692225974775.png (68.3 KiB)
globaltabledemo.fsm (41.1 KiB)
· 2
5 |100000

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

David Seo avatar image David Seo commented ·

What's your issue in your model? You explained your model but what's the problem of it?

-1 Like -1 ·
Natalie White avatar image Natalie White David Seo commented ·

There's no issue; this is an article, not a question. Just wanted to share the method used in the example!

1 Like 1 ·

Article

Contributors

natalie.white contributed to this article