Priority need

I want to simulate a process with change over times when a different product Type is processed at a process.
Before the process is a buffer and i want to check if there is a product of the same type is available.
In case this product is available, I want to prioritize this product to leaf the buffer.

In a second step, if 2 processes use products from the buffer, i want to have control which process gets which product