question

Thomas JR avatar image
0 Likes"
Thomas JR asked Thomas JR commented

Explicitly setting parent token label

I have a subflow activity where the Parent Label Access is set to Read. Thus the child token can not modify or create new labels on the parent token. However I am able to create a new label through custom code like this
token.parent.New_label = 356;

Is this supposed to be possible? and/or is this just simply left out in the documentation regarding parent/child relationships?

FlexSim 20.2.3
flexsim 20.2.3parent child hierarchysetting label
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
1 Like"
Matthew Gillespie answered Thomas JR commented

Yes, this is expected behavior. Setting the Parent Label Access is not really about encapsulation and preventing a child token from accessing things on the parent. It's more of an ease of use thing for determining what labels get accessed when you say token.MyLabel. On one end of the spectrum you give the token no access to parent labels so that all labels you read, write, or create using the token.LabelName syntax are on the child token. On the other end, the child token is just a proxy for the parent token and the token.LabelName syntax behaves exactly as if the child token were the parent token.

However, no matter what access you set, it's expected that if you explicitly access the parent token with token.parent then you have full access to the parent's labels.

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

Thomas JR avatar image Thomas JR commented ·

@Matthew Gillespie

Thanks! I’ve been struggling with some logic regarding split/join/batches and no preprogrammed activity settings seemed to suit my situation, i.e. until l found out that you can explicitly set parent token labels.

0 Likes 0 ·