you could introduce a method as a exit control for your buffer that limits your work in process to 100 in between your buffer and drain.
Example of how the method could look like:
var CurrWiP, LimitWiP : integer
LimitWiP := 100
CurrWiP := buffer.statnumout - drain.statnumout
if CurrWiP < LimitWiP
Waituntil CurrWiP < LimitWiP prio 1