question

Leah R avatar image
0 Likes"
Leah R asked Jeanette F commented

What is the difference between a token, a patient and "current" ?

FlexSim 22.1.0
tokenspatientcurrent
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Leah R, was Joerg Vogel'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.

0 Likes 0 ·

1 Answer

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel edited

token is a symbolic cookie for Process Flow, which stores data.

a patient can be a token in process flow in FlexSim Healthcare environment. Normally it is an item in a 3D model of FlexSim Healthcare with abilities of a taskexecuter.

current is a pointer in Flexscript source code. It contains a reference to the object, which function you are editing for. In Process Flow it is a reference to the Process Flow sheet, where you place your activities.

· 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.

Felix Möhlmann avatar image Felix Möhlmann commented ·

To add to what Jörg said:

In an instanced process flow, like a patient flow in the HC environment, current is a reference to the object the process flow instance belongs to.

Instances are essentially (mostly independent) copies of a process flow. They allow the user to build a single process flow and then assign multiple objects to it, that all work based on the same logic.

So in a patient flow, the keywords patient and current are synonymous. In fact, when looking at the code of patient flow activities, you can see that the patient variable is just a duplicate of current.

1658316003517.png

2 Likes 2 ·
1658316003517.png (2.2 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

In an instanced/object based process flow, current is a reference to that instance. The same for a subflow process flow when you choose any instantiation option other than global.

The purpose of a token is primarily to indicate the current activity or activities in the process flow such that when they finish, the token will proceed through the flow, executing the process. In some models the token represents an abstract element like an order, or shipping consignment in which case they can be used and the holder of key data, and so should be preserved through the life of that data. In other models they are transient with no consequence of being destroyed after a single pass through the process, and in some models they are in a closed loop that might be, for example, checking for work.


1 Like 1 ·