The concept is the same as for the workflow approval in the previous recipe. The Workflow task element is a definition that the designer will use when creating a workflow. The code we wrote simply handles the events as we need to.
The complicated part to understand is the status handling. It seems natural to have a status field for each workflow element (the type, approval, and task), and with this paradigm, we would be left thinking why there isn't a standard Base Enum we could simply use. The status of the document, and the statuses the document can be defined by us--what makes sense to the business, and not what makes sense in code. For the inspection task, we want to know if a vehicle is waiting inspection, is in progress, or if it is complete.