question

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

Send to Port: Execute SubFlow

Hello all,

I want to implement a simple logic to delay de transfer from a Processor to a Queue (or whatever other element). For that I'm using in the processor the option of Send to Port: Execute SubFlow. There I take out the item from the processor to the origin of the model and then move it back after the delay to the corresponding destination. Technically it makes what is expected, but in the log I get the following error everytime the SubFlow is executed:

time: 10.000000 exception: Error in executesubflow: No token arrived at finish activity "Finish SubFlow" in sub flow "Delayed Trasfer".

But it seems that the token did arrdelayedTransfer_test.fsmive, indeed. What can be happening?

Thanks in advance.

FlexSim 24.0.5
processorsubflowoutput port
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

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Joaquín MSV commented

Send To Port is a function expecting immediately a port number as a result to return. Any mechanism delaying this is not allowed. You can hold an item by return -1 in this function and release this item explicitly later by function releaseitem(obj item, num port).

This is suitable approach if you call a subflow. This subflow returns immediately a -1 value for the required return value and an independent created token delays the execution of releaseitem.

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