Building software with a general-purpose framework is fun, but not necessarily productive. Building software with a framework that specializes in solving our day-to-day problems can be fun and productive. We can tailor Windows Workflow to solve our day‑to‑day problems by writing custom activities. A custom activity might solve problems in a specific business domain such as a custom activity that can request tests on a patient's blood sample for healthcare applications. We could also write custom activities for a technology domain. If our applications make heavy use of Microsoft Message Queuing (MSMQ), it would make sense to build custom activities that interact with MSMQ.
We are going to start this chapter talking about why we would write custom activities, and then delve into different approaches for implementing custom activities. We will discuss how to build black box and white box activities using composition techniques. We will also look at using inheritance...