question

Bryan Suharik avatar image
0 Likes"
Bryan Suharik asked Bryan Suharik commented

Pull Requirement Depends on Downstream States help?

Hello,

I have a queue that flows to a seperator which seperates the flow item to 3 processors. I want the seperator to only pull flow items if all of the downstream processors are free, i.e. Idle.

I don't see any errors, but am unclear on how the pullrequirement activates. This code is on the "pullrequirement" node of the variables node of the separator object.

Is it correct to equate the getstatenum to STATE_IDLE? I've tried setting this line to getnodenum and referring to the node value in idle state which is 1.00, but this didn't work.

if(getstatenum(node("MT Repair 1",model())) == STATE_IDLE && getstatenum(node("ET Repair 1",model())) == STATE_IDLE && getnodenum(node("QC Check 1",model())) == STATE_IDLE)

{

return 1;

}

Thanks in advance for your help!! VERSION 6

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

1 Answer

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Bryan Suharik commented

What you are trying to achieve has nothing to do with the pull requirement. If you want that the pull requirement start testing the available items to pull you should open the output of the object connected to the input ports of the separator otherwise close their output. You could open or close the input of the separator depending on the availability or state of the following processors, too. Without process flow you have to check this condition in the OnExit triggers of each processor.

The pull requirement isn't a infinite repeating function like you could build it in process flow. If the function had tested all available items once, the pull requirement stops the testing.

The pull requirement is a function to look for a suitable item to pull depending on features connected to the item only.

· 3
5 |100000

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