question

Hemanth Sai Kumar avatar image
0 Likes"
Hemanth Sai Kumar asked Jason Lightfoot edited

Feeder logic using Process Flow

Hi community,

I have a use case where I need to write a feeding query logic in the process flow to pull parts from the queue based on condition. I am trying a if else condition to do so, but I am getting error while doing it.
Error:

time: 26.783511 exception: Exception caught in start() of activity "Pull from List" in process flow "ProcessFlow". Continuing throw...

time: 26.783511 exception: FlexScript exception: invalid variant type in list pull at MODEL:/Tools/ProcessFlow/ProcessFlow/Push to List>variables/onWaitTimerFired



Can someone help in resolving this,

Below I am attaching my sample model.
Feeder logic.fsm

FlexSim 24.1.1
process flowqueuepullfromlist
feeder-logic.fsm (39.0 KiB)
feeder-logic.fsm (39.0 KiB)
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

@Hemanth Sai Kumar, where do you assign a label called Type at a token? Conditions of global variables belong into process flow and not into a query. If you have checked all global conditions, then you you query for an list entry matching your filter. And it should be an query clause of a SQL as programming language.

0 Likes 0 ·

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

You can't put a FlexScript expression in the query fields and only return numerics - it needs to be a query, object or array that get's returned.

But it looks like you should be able to push the item to the list and then just put this expression directly into the query field:

WHERE (Type=2 AND {Type_B_count<3}) OR (Type=1 AND {Type_R_count<2})

The braces {} are for FlexScript expressions and seem to be needed to refer to the Global Variables.

5 |100000

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