How can I know if there is at least one token in an activity from process flow?

How can I know if there is at least one token in an activity from process flow?

ricard_rh
Not applicable
3 Views
3 Replies
Message 1 of 4

How can I know if there is at least one token in an activity from process flow?

ricard_rh
Not applicable

[ FlexSim 18.1.1 ]

I have to make a Conditional Decide activity which will send tokens to one port or the other depending on the existance of at least one token in an Acquire Resource activity in the same Process Flow. Is there any way to code it inside the Conditional Decide?

Accepted solutions (1)
4 Views
3 Replies
Replies (3)
Message 2 of 4

tanner_p
Not applicable

Is there a way you could upload an example model of what you are trying to do?

0 Likes
Message 3 of 4

gesa_r
Not applicable
Accepted solution

decide-tokens-in-activity.fsm

Hello Ricard,

I attached a small example model. Is that what you mean?

I used the function: gettokens(processFlow, getactivity(processFlow, "Resource")); in the decide on condition code. It returns an array with all tokens in the specified activity.

Message 4 of 4

ricard_rh
Not applicable

This is exactly what I needed, thank you so much!

0 Likes