BPM to disable Duplicate Parts unless it matches a specified Part#?

I have a BPM now to disable any part from being duplicated. What they want now is to allow only certain parts, 5 to be exact, to be duplicated but to continue to block the others.

I’ve tried various ways to but nothing is working. Any ideas?

Pre-Proc on Part.DuplicatePart

Condition: sourcePartNum is not equal to “MyAllowedPart”, AND sourcePart is not Equal to “MyAllowedPart2”… etc
Action: Raise Exception… “Can’t duplicate that part!!bad bad man!!!”

Where “ASD” is the Part you’d like to allow then

Jose, you’re awesome!

Thanks