& Construction

Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
& Manufacturing

Professional CAD/CAM tools built on Inventor and AutoCAD
Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
Professional CAD/CAM tools built on Inventor and AutoCAD
[ FlexSim 22.2.2 ]
I am trying to collect utilization on my staff in my model by collecting different times they are performing different specific tasks. I have a label on the token coming in define the action and have the specific action defined in my Staff State Table. I am trying to collect the time by assigning the action in the "Perform Task" using the label on the incoming token.
(e.g. on the token label "pulled.ActionType" would say "FillerCIP")
When I do this, it will not collect the time in the dashboard under the action I specified. It will collect the time as "Idle." Is there a way to do this apart from the example below?
My problem is that I am using this subflow for several different actions. So the token label may have different action types specified depending on what token comes in.
Thanks.
Solved! Go to Solution.
Yes, the token label should have the label that I'm looking for.
The process flow Main Model feeds to the process flows MaterialFlow and the PersonnelFlow. These both contain the code of interest.
There seems to be a bug with that State field where it's not recognizing that code has been typed in and it's just treating it as a string literal, i.e. it's setting the state to the "token.pulled.ActionType" state.
I've updated your model using the 2nd workaround listed below. roundlake-v4_1.fsm
Here are two workarounds you could use for now:
1. Use an AssignLabels activity to put the state string on a label on the token. Then in the State field, click the drop down, go to Token Labels, and choose the label you assigned it onto.
OR
2. In the State field, click the drop down, and choose Code Editor. Then paste in code like this:
Object current = param(1); treenode activity = param(2); Token token = param(3); treenode processFlow = ownerobject(activity); return /**/token.pulled.ActionType/**direct*/;
How were you able to set both the custom code and the token label? Mine was only able to set one or the other.
i.e. if I write to the custom code it removes the label, and vice versa.
Hi @JacksonG, was Matthew Gillespie's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.
If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.
How to buy
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © 2025 Autodesk Inc. All rights reserved
Type a product name