For many workflows, an important step will be to decide how the workflow will interact with an application. How do we know if a workflow finished successfully or threw an exception? How do we get data into a workflow instance? When the workflow completes, how do we get data out? Technically, there are an infinite number of solutions to these questions. In this section, however, we are going to cover some of the fundamental techniques.
The basic mechanisms for communicating with a workflow include events, methods, and workflow parameters. An application can both raise events to a workflow instance and receive lifecycle events about a workflow instance from the workflow runtime. These lifecycle events are the first topic for discussion.