How it works...
The workflow approval is set up with outcomes, which are referenced to an event handler class that implements an interface for each outcome it handles. Each outcome is tied, internally, to that interface. When the outcome occurs, it will construct the referenced event handler class using the interface as the type. It then calls the appropriate method. This pattern of instantiating a class using the interface as the type is common pattern, and we have used this ourselves in Chapter 10, Extensibility Through Metadata and Data Date-Effectiveness.
There are some events (Started and Cancelled, for example) that are set on the work approval's main property sheet. All this was created for us when we created the workflow approval ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access