question

Joaquín MSV avatar image
0 Likes"
Joaquín MSV asked Joaquín MSV commented

Token released from subflow before finishing tasks

Hello,

I've built a simple model to handle AGVs and elevators purely on process flow. I have made a subflow where I split the entering token into 2 independent ones to make two movements in parallel and later I join them to continue the movement and finish the subflow. For some reason, the "join" function is doing something strange because it releases the token out of the subflow while it hasn't finished the following blocks inside the subflow yet. Funny thing is that you can see a token inside the subflow still while the parent has gone out (when error in execution is triggered).

I've had to place a "synchronize" block before to make it work. Then the "join" works fine and the process continues sequentially. If you remove the "synchronize" block and test the model you will see the problem.

Why is this happening? I think it shoulnd't be necessary according to documentation. I have models in which this works fine without placing any synchronization block.

Could you help me on this point to understand this strange behavior?

Thanks in advance.

example_list_agv_nikita.fsm

FlexSim 24.0.4
processflowsubflowsplitjoinsynchronize
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

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Joaquín MSV commented

Can't say with 100% certainty, because you only uploaded the version with a Synchronize activity. But most likely the issue is a wrong connection order.

The Join activity will keep the token that enters through the connector with rank 1 and delete all others. If the original sub flow token ends up being deleted the parent token would continue. So make sure that the token that leaves the Split through the first connector enters the Join through the first connector.

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

Joaquín MSV avatar image Joaquín MSV commented ·

Hello Felix,

Attached is the version without the syncronization. I've paid attention on the order of connections, keeping 1-1 and 2-2. And as you say, it works as it shoud be.

Thanks for the explanation.

example_list_agv_nikita_no_synchro.fsm

0 Likes 0 ·