question

SudheerReddy avatar image
1 Like"
SudheerReddy asked Walker huang commented

In Event listening activity, Doubt on Will Override Return Value option

As shown in below Image

In Override Processing Times Flow Chart, In activity Wait for Event: Process Time we checked Will Override Return Value. But we are not returning any return value in Wait for Event: Process Time to the processor in 3D model. In Finish and Override Process Time Return Value is token.processTime.

Here my question is the token which is returning the Return Value as token.processTime is in activity Finish and Override Process Time, in this activity we haven't specified where to return this return value. But still this is returning to processor.

Could some one please explain how this is happening. How this is working ?

FlexSim 20.0.0
wait for event
return-li.jpg (891.1 KiB)
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

Phil BoBo avatar image
4 Likes"
Phil BoBo answered Walker huang commented

This is working exactly how you said. When you check that box, the value returned from the finish activity is passed back to the event that spawned that token, as explained in the user manual about that checkbox:

"Will Override Return Value - The Wait For Event and Event Triggered Source activities have a Will Override Return Value property. This property allows the token to give a new return value to the event that was triggered. For example, overriding the Process Time event of a processor would allow you to perform steps using process flow to define the process time of that processor. The processor will ignore whatever value was originally returned in the Process Time box. When overriding a return value, the token will move through the defined set of activities until it hits a Finish activity where it will evaluate the return value for the event. (A return value might be data from a calculation, a new label value, etc.)"

https://docs.flexsim.com/en/20.0/Reference/ProcessFlowObjects/SubFlow/Finish/

That's a feature of those activities. It is working because those activities have code that does this.

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