Articoli correlati a Foundations of WF: An Introduction to Windows Workflow...

Foundations of WF: An Introduction to Windows Workflow Foundation - Brossura

 
9781590597187: Foundations of WF: An Introduction to Windows Workflow Foundation

Sinossi

Have you ever spent hours coding workflow for your applications? If so, the new Microsoft Windows Workflow Foundation (WF) technology will make your life easier. Foundations of WF: An Introduction to Windows Workflow Foundation introduces you to using Visual Studio 2005 and the Windows Workflow Foundation (part of Windows Vista) to create workflow packages. The book begins by giving you an overview of Windows Workflow Foundation. Then it introduces and shows examples of the various types of workflow that can be created.

You’ll discover the power of WF. You’ll learn about all the prebuild activities you can include in your workflow, along with how to create your own activities. WF is fully extensible and allows you an unlimited number of options for your workflow. You’ll also learn how to use workflow activities to retrieve data, and finally, how to tie an ASP.NET application with a workflow built in WF.

This book, unlike most of the Microsoft WF samples, has code in both Visual Basic .NET and C#. All the examples—and there are many—have VB .NET code, and many have the accompanying C# code. This book will allow you to begin creating new workflow applications easily in either VB .NET or C#. Each chapter includes an introduction to one or more activities that make up WF, along with examples of how to use each activity. Many chapters include a final section providing a real world example (a purchase order system). This book will have you using WF to create workflow applications with VB .NET or C# in a short amount of time.

Le informazioni nella sezione "Riassunto" possono far riferimento a edizioni diverse di questo titolo.

L'autore

Brian Myers is a Microsoft Certified Professional and Microsoft Certified Application Developer for .NET. He is currently a software engineer and database administrator.

Contenuti

Contents
About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xi
About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii

CHAPTER 1 Introduction to Workflow and Windows
Workflow Foundation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
What Is Workflow? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
When to Use Which Workflow Type . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Why Use Workflows? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Introducing Windows Workflow Foundation . . . . . . . . . . . . . . . . . . . . . . . . 3
Architecture of Windows Workflow Foundation . . . . . . . . . . . . . . . . . . . . . . 3
Getting Started with WF and VS2005 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Out-of-the-Box Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

CHAPTER 2 First Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Workflow and Activities As Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Workflow Code in VB .NET. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Workflow Code in C# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
First Workflow in VB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Sequential Workflow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Passing Parameters to VB .NET Workflow . . . . . . . . . . . . . . . . . . . . . 24
State Machine Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
First Workflow in C# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Code Differences Between VB and C# . . . . . . . . . . . . . . . . . . . . . . . . 31
Passing Parameters to C# Workflow . . . . . . . . . . . . . . . . . . . . . . . . . 33
Real-World Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

CHAPTER 3 Conditional Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
IfElse Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
IfElse Activity Within Sequential Workflow. . . . . . . . . . . . . . . . . . . . . 43
IfElse Activity Within State Machine Workflow . . . . . . . . . . . . . . . . . 49
While Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
While Activity Within Sequential Workflow . . . . . . . . . . . . . . . . . . . . 53
While Activity Within State Machine Workflow . . . . . . . . . . . . . . . . . 54
Conditional Activity Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Conditional Activity Group Within Sequential Workflow . . . . . . . . . . 55
Conditional Activity Group Within State Machine Workflow. . . . . . . 57
Real-World Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

CHAPTER 4 Flow Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
State Machine Specific Control Activities . . . . . . . . . . . . . . . . . . . . . . . . . 67
State-Related Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Delay, Suspend, and Terminate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Delay, Suspend, and Terminate in VB . . . . . . . . . . . . . . . . . . . . . . . . 71
Delay, Suspend, and Terminate in C# . . . . . . . . . . . . . . . . . . . . . . . . 79
Sequence and Parallel Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Sequence Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
State Machine Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
EventDriven Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Real-World Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

CHAPTER 5 Rules-Based Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Rules in WF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Rules and the Policy Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Sequential Chaining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Full Chaining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Real-World Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

CHAPTER 6 Workflow and Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
InvokeWebService Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Workflow As Web Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

CHAPTER 7 Interacting with Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Workflow Messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
CallExternalMethod Activity in VB . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
CallExternalMethod Activity in C# . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Events in VB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Events in C# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Workflow Fault Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Transaction Scope and Compensate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

CHAPTER 8 Custom Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Basics of a Custom Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Creating a New Activity from the Activity Class . . . . . . . . . . . . . . . . . . . 141
Example in VB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Example in C# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Real-World Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

CHAPTER 9 Deploying Workflow Applications . . . . . . . . . . . . . . . . . . . . . . . 163
Deployment Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Real-World Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
ClickOnce Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
SQLPersistenceService . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Implementing Persistence in VB . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Implementing Persistence in C# . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

CHAPTER 10 Employee Performance Review Application . . . . . . . . . . . . 173
Workflow Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Employee Performance Review Business Process . . . . . . . . . . . . . 173
Translating Model into Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Application Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Create the EPR Database and Tables . . . . . . . . . . . . . . . . . . . . . . . . 178
Create the SQLPersistenceService SQL Server Database . . . . . . . 190
Create a New ASP.NET Web Site . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Build All ASP.NET Web Pages That Don’t Interact with the Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Build the Complete Workflow and Test with a Simple Console Application First . . . . . . . . . . . . . . . . . . ...

Le informazioni nella sezione "Su questo libro" possono far riferimento a edizioni diverse di questo titolo.

  • EditoreApress
  • Data di pubblicazione2008
  • ISBN 10 1590597184
  • ISBN 13 9781590597187
  • RilegaturaCopertina flessibile
  • LinguaInglese
  • Numero di pagine260

Altre edizioni note dello stesso titolo

9781430221289: Foundations of WF: an Introduction to Windows Workflow Foundation

Edizione in evidenza

ISBN 10:  1430221283 ISBN 13:  9781430221289
Casa editrice: Apress, 2010
Brossura

Risultati della ricerca per Foundations of WF: An Introduction to Windows Workflow...

Foto dell'editore

Myers, Brian
Editore: Apress, 2007
ISBN 10: 1590597184 ISBN 13: 9781590597187
Nuovo Paperback

Da: Redux Books, Grand Rapids, MI, U.S.A.

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Paperback. Condizione: New. New paperback from bookstore stock. An unread copy. May have minor rubbing and scuffing from shelf wear.; 100% Satisfaction Guaranteed! Ships same or next business day! Codice articolo 111710110023

Contatta il venditore

Compra nuovo

EUR 10,37
Convertire valuta
Spese di spedizione: GRATIS
In U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Brian R. Myers
Editore: Apress, Incorporated, 2006
ISBN 10: 1590597184 ISBN 13: 9781590597187
Nuovo Brossura

Da: Books Puddle, New York, NY, U.S.A.

Valutazione del venditore 4 su 5 stelle 4 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: New. pp. 260. Codice articolo 26296736

Contatta il venditore

Compra nuovo

EUR 20,46
Convertire valuta
Spese di spedizione: EUR 3,53
In U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Myers Brian R.
Editore: Apress, Incorporated, 2006
ISBN 10: 1590597184 ISBN 13: 9781590597187
Nuovo Brossura

Da: Majestic Books, Hounslow, Regno Unito

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: New. pp. 260 Illus. Codice articolo 7551231

Contatta il venditore

Compra nuovo

EUR 18,09
Convertire valuta
Spese di spedizione: EUR 7,63
Da: Regno Unito a: U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Myers, Brian
Editore: Apress, 2006
ISBN 10: 1590597184 ISBN 13: 9781590597187
Nuovo Brossura

Da: Lucky's Textbooks, Dallas, TX, U.S.A.

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: New. Codice articolo ABLIING23Mar2811580082239

Contatta il venditore

Compra nuovo

EUR 24,40
Convertire valuta
Spese di spedizione: EUR 3,53
In U.S.A.
Destinazione, tempi e costi

Quantità: Più di 20 disponibili

Aggiungi al carrello

Foto dell'editore

Myers Brian R.
Editore: Apress, Incorporated, 2006
ISBN 10: 1590597184 ISBN 13: 9781590597187
Nuovo Brossura

Da: Biblios, Frankfurt am main, HESSE, Germania

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: New. pp. 260. Codice articolo 18296746

Contatta il venditore

Compra nuovo

EUR 18,93
Convertire valuta
Spese di spedizione: EUR 9,95
Da: Germania a: U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Brian Myers ,
Editore: Apress, 2006
ISBN 10: 1590597184 ISBN 13: 9781590597187
Nuovo Brossura

Da: Romtrade Corp., STERLING HEIGHTS, MI, U.S.A.

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: New. This is a Brand-new US Edition. This Item may be shipped from US or any other country as we have multiple locations worldwide. Codice articolo ABNR-124451

Contatta il venditore

Compra nuovo

EUR 36,26
Convertire valuta
Spese di spedizione: GRATIS
In U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Brian Myers ,
Editore: Apress, 2006
ISBN 10: 1590597184 ISBN 13: 9781590597187
Nuovo Brossura

Da: Basi6 International, Irving, TX, U.S.A.

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: Brand New. New. US edition. Expediting shipping for all USA and Europe orders excluding PO Box. Excellent Customer Service. Codice articolo ABEJUNE24-195568

Contatta il venditore

Compra nuovo

EUR 36,26
Convertire valuta
Spese di spedizione: GRATIS
In U.S.A.
Destinazione, tempi e costi

Quantità: 1 disponibili

Aggiungi al carrello

Foto dell'editore

Brian Myers
Editore: APress, 2006
ISBN 10: 1590597184 ISBN 13: 9781590597187
Nuovo Paperback / softback
Print on Demand

Da: THE SAINT BOOKSTORE, Southport, Regno Unito

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Paperback / softback. Condizione: New. This item is printed on demand. New copy - Usually dispatched within 5-9 working days 524. Codice articolo C9781590597187

Contatta il venditore

Compra nuovo

EUR 34,21
Convertire valuta
Spese di spedizione: EUR 14,08
Da: Regno Unito a: U.S.A.
Destinazione, tempi e costi

Quantità: Più di 20 disponibili

Aggiungi al carrello

Foto dell'editore

Myers, Brian
Editore: Apress, 2006
ISBN 10: 1590597184 ISBN 13: 9781590597187
Nuovo Brossura

Da: Ria Christie Collections, Uxbridge, Regno Unito

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Condizione: New. In. Codice articolo ria9781590597187_new

Contatta il venditore

Compra nuovo

EUR 35,13
Convertire valuta
Spese di spedizione: EUR 14,07
Da: Regno Unito a: U.S.A.
Destinazione, tempi e costi

Quantità: Più di 20 disponibili

Aggiungi al carrello

Foto dell'editore

Brian Myers
Editore: Apress, 2006
ISBN 10: 1590597184 ISBN 13: 9781590597187
Nuovo Paperback

Da: Revaluation Books, Exeter, Regno Unito

Valutazione del venditore 5 su 5 stelle 5 stelle, Maggiori informazioni sulle valutazioni dei venditori

Paperback. Condizione: Brand New. 240 pages. 10.00x7.25x0.50 inches. In Stock. Codice articolo x-1590597184

Contatta il venditore

Compra nuovo

EUR 37,78
Convertire valuta
Spese di spedizione: EUR 11,74
Da: Regno Unito a: U.S.A.
Destinazione, tempi e costi

Quantità: 2 disponibili

Aggiungi al carrello

Vedi altre 3 copie di questo libro

Vedi tutti i risultati per questo libro