question

Mohamed Slama avatar image
0 Likes"
Mohamed Slama asked Matthew Gillespie answered

How to make each fixed ressource uses its own process flow variables?

essai-two-machines-v01.fsmHi,

In my model, I have 2 fixed ressources. I want that each ressource uses the corresponding process flow variables which are global tables.

I want that "FixedRessource 1" uses as Parameters1 "MachineParameters1" and as Parameters2 "SensorsState1" and the "FixedRessource2" uses as Parameters1 "MachineParameters1_2" and as Parameters2 "SensorsState1_2".

I tried this with choosing the option "Per Instance" in the properties but it doesn't work. Both of my Fixed Ressources use the same Parameters 1 and 2.

Could you please help me to resolve this problem ?

Thank you,

Slama

Choose One
process flowglobal tablesfixed resource process flow
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

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered

It looks like you're using this code to reference your Process Flow variables:

getprocessflowvar(processFlow,"Parameters1")

You should also pass in the token so that the getprocessflowvar command knows which instance of the process flow to look at, otherwise it just looks at the first instance:

getprocessflowvar(processFlow,"Parameters1", token)

Another easy way to deal with Process Flow Variables is to use an Assign Labels activity and use the dropdown on the value field to select the Process Flow Variable and assign it to a label value on the token. Doing this will take care of resolving the instance for you.

5 |100000

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