This recipe focuses on the creation of a purchase order in code. This is actually the first of three recipes that will extend our service status change handling over the next few recipes into a framework that allows the functional consultant more control over the business logic that is executed. One of the problems in solution design is that the business rules are often coded into the solution, and each iteration in the implementation evolves these rules and results in a change to the code. Writing business logic in a succinct class designed for that purpose results in code that is easier to read, maintain, and change. One common problem is when we are asked to write code that links user-defined data to code. Here's an example:
When an item of the Audio Item Group is bought from an import vendor, it must print the Audio specification...