I'd like to preempt a token from a delay activity. Before I can do this I have to identify this token. Is there a method like querying a flowitem in a queue. It is described in the manual: SQL Queries "Advanced Query Techniques".
I'd like to preempt a token from a delay activity. Before I can do this I have to identify this token. Is there a method like querying a flowitem in a queue. It is described in the manual: SQL Queries "Advanced Query Techniques".
You can do this using List. I have attached the sample models.
Using below code to push the tokens from the "Delay" activity to the list. Then use Query in a Pull from activity in order to identify the token.
string name = "Delay"; int flags = 0; Array tokens = gettokens(current, getactivity(processFlow, name), flags); for (int i = 1; i <= tokens.length; i++) { Token otherToken = tokens[i]; List("List1").push(otherToken); }
In the second attached model, I have added one more label named "preempted" and assign "0" as a value to the token. There is a possibility to select the same token again for preemption that's why I have added this and change that value to "1" once it is preempted also set different color to the preempted token.
I hope this helps you.
Thanks.
13 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved