Using the SetState Activity

In a purely electronic system, one made using electrical components (your computer’s processor, for example), the fact that an event fires is enough to transition from one state to another. The presence of an electrical voltage or voltages sets in motion everything that’s required for a state change.

WF is not an electronic system, even if it is executed on your system’s processor. What this means to you is that firing an event your design specifies as the signal for a state change is not enough to transition to the other state. Instead, you must insert another activity—SetState.

The SetState activity, interestingly enough, isn’t one of the activities you can drop into the State activity directly. Why is this? Because ...

Get Microsoft® Windows® Workflow Foundation Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.