question

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

Confusion about Join activity and relationship between tokens

In the documentation: Building the Model's Logic --> Additional Process Flow Concepts --> Process Flow Coordination, the following is read

Say I have a Split activity with two outgoing connectors, each connector going to an individual Aquire ressource activity, and finally both connectors beith joined using a Join activity.

In the split acticity if I select "Create as Independent Tokens" the final token does not aquire the ressource from the other token as correctly stated in above note. However, if I select "Create as Child Tokens" it does aquire from the other token.

Why does it work when using child tokens?

Generally, if you create an independent token in a Split activity then does the original token in the first connector still act as a "Parent token", though both tokens are in fact independent?


FlexSim 20.1.3
flexsim 20.1.3joinparent child hierarchy
1594967817648.png (32.6 KiB)
1594969243837.png (32.5 KiB)
· 3
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

Split / Join Activities are a mutual couple. If you need total independent tokens, then there is a Create Token activity. And as it said, it is a construct of coordination. It has been first a mechanism to implement coordinated tasksequences in process flow. But you can use it on other tasks of coordination, too.

0 Likes 0 ·
Thomas JR avatar image Thomas JR Joerg Vogel commented ·

@joerg.vogel

Ok thanks, guess I took the note somewhat out of context.

0 Likes 0 ·
Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @thomas.jr, was jordan.johnson's or joerg.vogel's answer helpful? If so, please click the red "Accept" button on one of their answers. Or if you still have questions, add a comment and we'll continue the conversation.

0 Likes 0 ·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered

If you want to acquire two resources at once with a split/join, then yes, you need tell the split to create child tokens. In addition, you probably have the "Label Access on Parent Only" option selected. So the split makes a child token of the token that came in connector 1, and that child token acquires a resource on the parent's labels, like you wanted.

Creating sibling tokens would only matter if the token coming in the split had a parent token. Then the tokens created in the split activity would become children of the incoming token's parent.

Creating independent tokens doesn't work because the created token acquires the second resource, and then is destroyed in the Join activity. There is no good way to transfer ownership of a resource in a Join.

If you wanted to aggregate labels on all split tokens without using parent/child relationships, you could use a batch activity instead of a Join. Just be sure to group by the split ID in the batch, if you do.

5 |100000

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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Thomas JR commented

This blue box text describes outgoing tokens behavior of Join activities and NOT Split activities. A Split activity creates tokens for each additional outgoing connector. There exists always a coupling independent from their state of inheritance. Child or independent token set only a behavior how data is processed similar of object-oriented programming. A child token inherits data of the parent as long as it exists. An independent token is a copy of the origin.

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

Hm, I've just tried the "Create as Sibling Tokens" in the Split acitivty in my example described above. That way the final token in the Join acticity also does not inherit aquired ressources from all tokens. Thus, the only working way remains "Create as Child Tokens" but I'm still unsure why that is.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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