I've built a package (order_intake) that combines a record type, a collection, a cursor loop, and exception handling with ROLLBACK, relying on a trigger on a related table to enforce a business rule. Here is the full spec and body: [paste your code]. Trace through what happens, step by step, if the second item in a two-item order fails the trigger's stock check. Does the first item's insert get undone too, or does it stay in the database?
