question

Marco Baccalaro avatar image
2 Likes"
Marco Baccalaro asked Marco Baccalaro commented

Order of execution in Process Flow

Hello,

I want to fully understand the order of execution in FlexSim and I still have a doubt on how Process Flows works.

In the attached models I have two different behaviors if I push to a list from a trigger of an object (or from a script) and if I do the same from a Custom Code activity of a Process flow:

  1. If I push to the list outside of the Process Flow more items together, they can be pulled separately by different tokens that flow one by one to the next activity
  2. If I push to the list by a Process Flow more items together, they are pulled separately, but the tokens wait on the "Pull from List" activity until all the pushes are done

I have attached two examples:

  1. Push from Trigger - Uses the On Entry of the Queue to push - At every Push, the token that pull
  2. Push from Process Flow - Uses the "Push to List" custom code of the Process Flow "Push Process Flow" to push - On the "Pull Process Flow" the tokens don't move from the Pull From List activity until every push is completed

Why do I have these different behaviors?

Is there a guideline on these "order of execution" aspects?

Thank you.

order-of-execution-question-push-from-trigger.fsm

order-of-execution-question-push-from-process-flow.fsm

FlexSim 19.0.2
order of execution
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

Joshua S avatar image
0 Likes"
Joshua S answered Marco Baccalaro commented

So in process flow, each token takes its turn in flowing from one activity to another, so the token that is running the code to push everything to the list currently has priority, and other tokens will not be allowed to flow unit it is done with its task.

· 3
5 |100000

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