question

ColetonC avatar image
0 Likes"
ColetonC asked ColetonC edited

Releasing resources within a subflow

I am trying to model a process that requires two operators where one will finish before the other. I have a subflow setup that pulls two resources and creates two child tokens with one of the two resources. Each token is then sent through a round robin decide to a set of tasks (it does not matter which resources performs the task). Each token finishes the task at a different time. I need the resources to be released when their assigned tasks are completed. I have tried using a Release Resource operation within the subflow after the task sequence; however they are currently waiting until both are finished and returning to the parent to release each resource.

FlexSim 24.2.3
subflowresource releasemultiple resources
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·
@ColetonC,. please attach an example model file. It is difficult to estimate how you have referenced your resources in child token.
1 Like 1 ·
ColetonC avatar image ColetonC Joerg Vogel commented ·

Here is a screen shot pointing to the area of issue in process flow and the model: Resource Release Example.fsm

1739458485657.png

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered ColetonC edited

The issue is that you give the child tokens their own "TestOperator" label in the Run Sub Flow activity. Thus, in the Release activity they will refer to their own label. Which is not where the acquired resources are stored.

1739459961539.png

You have two options to fix this:
Either specify that you want to access the parent's label in the Release activity. (In which case you need to use the syntax below to refer to the label node, rather than the label value).

1739460010803.png

Or you use a different name for the child's operator label, so the original name will forward to the parent's label automatically (as long as the child has read-access to the parent's labels).

1739460098921.png

1739460121790.png

In the last screenshot you also see that you can pass an object reference into the "Resource to Release" field instead of using an index.

resource-release-example_1.fsm


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

ColetonC avatar image ColetonC commented ·

Thank you for this response. It has helped greatly.

0 Likes 0 ·