BPM to prevent quantities more than previous operation

I have been tasked to develop a BPM that will prevent users from entering quantities for an operation more than what has been produced in previous operation for the job. BAQ capabilities in BPM are very limited and I don’t have much knowledge about C# programming for custom code in BPM.
Any help would be highly appreciated.
Thank in advance.

have you read this thread ? it should give you a good start