question

Mohamed Roushdy avatar image
0 Likes"
Mohamed Roushdy asked Mohamed Roushdy commented

the token advances to the next step before ending the sub flow

I have a problem where the token advances to the following steps in the process flow before ending the sub-flow; can any one help me to know the reason?

this occurs only for a certain sub-flow; the other sub-flow in the same process flow sub-flow-issue.jpgare working well

FlexSim 18.1.1
process flowsub flow
sub-flow-issue.jpg (126.6 KiB)
· 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.

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

You'll need to attach your model. There's not enough information in that screenshot.

0 Likes 0 ·
Mohamed Roushdy avatar image Mohamed Roushdy Matthew Gillespie ♦♦ commented ·

3-autosave.fsm

here is my model; as you will see i used 2 sub flows for load an unload picks; the load subflow is working well but the unload sub flow not.

0 Likes 0 ·
3-autosave.fsm (237.8 KiB)

1 Answer

·
Regan Blackett avatar image
2 Likes"
Regan Blackett answered Mohamed Roushdy commented

It's tough to diagnose on just the image but here's something to look at, related to the use of Split/Join inside a Subflow.

I'm guessing that your token that does the "unload Case" Run Subflow activity sends one child token into the Subflow. Now the Split activities by default create tokens that are independent of each other. So the original child token is still a child of the main token, but the new token that comes out of the Split activity won't be unless you tell the Split to make Sibling Tokens.

This can be important because the order of the connectors that lead back into a Join matters as to what token comes out of a Join. If the newly created independent token arrives to the Join on its first inbound connector, then that's the token that the Join releases. The original Child token would actually be destroyed by the Join which the Subflow would treat the same as hitting a finish activity. Since the Parent would only know about its one Child and not the token the Child created via the Split, that's enough to release the Parent token from the Run Subflow activity, even though the Split-created token is still in the Subflow.

If this is the issue, the best thing to do is to make sure that the original Child token always arrives to any Join on inbound Connector 1.

· 4
5 |100000

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

Regan Blackett avatar image Regan Blackett ♦ commented ·

@Mohamed R3

I just noticed that there was a model posted here, and I think I was right; in the subflow attached to 'unload Case' the original Child token get split to the left-hand travel activity which is Connector #1, but the Join activity has that activity inbound on Connector #2. This is deleting your original Child token and allowing the parent token to be released from the 'unload Case' activity. Make sure the Child token leaves a split on on Connector #1 and arrives to a Join on inbound Connector #1 and it will work fine.


1 Like 1 ·
Mohamed Roushdy avatar image Mohamed Roushdy Regan Blackett ♦ commented ·

@Regan Blackett thanks a lot for your support; and sorry for my late reply.

it's now working fine

0 Likes 0 ·
Emily Hardy avatar image Emily Hardy ♦ commented ·

@Mohamed R3, did this help answer your question?

0 Likes 0 ·
Mohamed Roushdy avatar image Mohamed Roushdy commented ·

@Emily Hardy,unfortunately the problem still exist, i'll be grateful if you could help.

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.