The person flow is an instanced process flow. This essentially means that each customer runs through its own copy of the process flow. In order for the resource to be shared between those instances it has to be set to global. This will then prevent more than the specified amount of customers acquiring the resource at the same time.

Another way to limit which tokens can continue, would be to use a global list. The process flow that creates the cakes/items can push those to the global list. The customer tokens then each have to pull an item from the list, matching one customer to one cake in the process.
This has the benefit that the pushing and pulling things from the list can happen at different times. WIth your approach, if a cake were to finish processing while no customer is waiting, the model would become stuck because the Wait for Event was "missed".
In the attached example I actually use two lists. Each cake is pushed to the first list upon its creation and to the second when it finished processing. When a customer was able to pull a cake from the first list, they will enter the waiting line. There they wait until they can pull the a cake from the second ("finished") list and then collect it and leave.


vdo-content2_1.fsm