Limiting the amount of product in a process flow

Hello everyone.

I am quite new to VC, I am working on a model. I want to limit the total amount of products (Work In Progress) in the simulation to 4.

I am working on modelling a flexible manufacturing system in VC, due to the limited number of workstation in my model anytime the amount of products in the model exceed 4, there occurs a blockage of the system. I have used the beacon to show the state of each work station.

My idea is to edit the feeder to stop the release a new product instance when the total amount of products in the model is equal to 4. Then release a new product instance into the model when the total amount of product in the model is less than 4. This will prevent the system from blockage.

I tried to use flow control statement of Process Executor but I am not getting it right. I really appreciate any idea to solve this.

Thanks in advance.