Initiating Transactions in Your Workflows

In general, initiating transactions in WF is as simple as dropping a transaction-based activity into your workflow. If you’re using transactional activities, however, there is a little more you should know.

Workflow Runtime and Transactional Services

When you use a transaction-based activity in your workflow, two workflow-pluggable services are required. First, because the two out-of-the-box transaction-based WF activities are both decorated with the PersistOnClose attribute (mentioned in Chapter 6), you must also start the SqlWorkflowPersistenceService. If you do not, WF won’t crash, but neither will your transactions commit.

Perhaps more interesting for this chapter is the DefaultWorkflowTransactionService ...

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.