Date post: | 17-Jan-2018 |
Category: |
Documents |
Upload: | anis-obrien |
View: | 222 times |
Download: | 0 times |
Ten Architectural Opportunities for Workflow
John EvdemonArchitectMicrosoft Corporation
Session Objectives And Key Takeaways
Session Objective: Awareness of workflow’s role in common architectural challengesProvide some tool-specific guidance
Key Takeaways:Workflow improves agilityWF and BizTalk ServerWF and WCFBPEL Strategy
AssumptionsFamiliarity with Windows Workflow Foundation
Familiarity with BizTalk Server
FactMyth
WF and BizTalk are not competing technologies
Clarification: WF and BizTalk
WF and BizTalk are complementary technologies that serve different needs:
WF is a developer framework, workflow within an application
BizTalk Server is a product, implement workflow across disparate applications
WF is a replacement for BizTalk
Ten Architectural OpportunitiesIn no special order…1. Transactions
2. High frequency of change3. Business Rules4. Large data set in flow5. Web services6. Process Externalization7. Long Running Processes8. Auditing and analytics9. Human intervention 10. UI Flow
1. TransactionsBizTalk
Three Transaction TypesNoneAtomic (Short-Lived)Long-Running
Transaction Type defined within
Entire orchestration (global)Scope shape
Orchestration to be long running or atomicException handling and compensation blocks
Long-Running
Scope
Loan application received
Request Credit Report
Order Appraisal
Sign Documents
1. TransactionsWF
Scope properties:Atomic TransactionLong-Running
Atomic transactions Persistence at end of Commit Roll back to last known state of workflowCannot be nestedException handlers not permitted
Long-Running Processes May contain atomic or other Long-Running ProcessesMay be nested to arbitrary depths
Long-Running
Atomic Transaction
Loan application received
Request Credit Report
Order Appraisal
Sign Documents
Ten Architectural OpportunitiesIn no special order…1. Transactions
2. High frequency of change3. Business Rules4. Large data set in flow5. Web services6. Process Externalization7. Long Running Processes8. Auditing and analytics9. Human intervention 10. UI Flow
2. High Frequency of ChangeBizTalkBusiness RulesBizTalk Server 2006 Orchestration Designer for Business Analysts (Visio)
Windows Workflow FoundationBusiness RulesEmbeddable design surface
Business process analysts need a different class of modeling tools
PartnersStandalone DSL toolkits for business process design
Ten Architectural OpportunitiesIn no special order…1. Transactions
2. High frequency of change3. Business Rules4. Large data set in flow5. Web services6. Process Externalization7. Long Running Processes8. Auditing and analytics9. Human intervention 10. UI Flow
BizTalk Rules and Orchestration Patterns
Call Rules Engine to execute logic, instead of burying it in code
Call Rules Engine and determine path
Call Rules Engine to dynamically populate messaging routing information
Use the Rules Engine for dynamic or variable delays
3. Business Rules
WF: Two CategoriesConditions on activities
If-ElseWhileReplicator (for-each)Conditioned Activity Group (CAG)<custom activity>
Policy activityContains and executes a RuleSetRuleSet execution provides priority-based, forward-chaining semantics RuleSet execution outside of a workflow
3. Business Rules
3. Business RulesWindows Workflow Foundation will provide the core rules engine evaluator and developer tools in BizTalk v.Next
BizTalk will continue to provide premium tooling and server infrastructure, e.g.:
Business analyst toolsRuleSet storage and managementRuleSet analysis
Ten Architectural OpportunitiesIn no special order…1. Transactions
2. High frequency of change3. Business Rules4. Large data set in flow5. Web services6. Process Externalization7. Long Running Processes8. Auditing and analytics9. Human intervention 10. UI Flow
Beware of CDATA wrappers!BizTalk Disassembler and Assembler stream data using XmlReader
Entire string must be read into memory to process it
Recommendations:Keep your messages small, if possibleBTS 2004: Avoid the mapper for large XML messages or flat files BTS 2006: Large Message Transformation engineAvoid large message scenarios that require anything more than routing
4. Large data set in flowBizTalk
4. Large data set in flowWF
WF is far less complex
Keep pointers to messages stored in a database or filesystem for messages larger than what you would want to keep in RAM
Ten Architectural OpportunitiesIn no special order…1. Transactions
2. High frequency of change3. Business Rules4. Large data set in flow5. Web services6. Process Externalization7. Long Running Processes8. Auditing and analytics9. Human intervention 10. UI Flow
5. Web ServicesCoordinating ServicesCoordinating Services
Message
Message
Workflows exposedWorkflows exposedthrough servicesthrough services
Message
WorkflowWorkflow
Message
Message
Message
WF and ASMX Web Services
WF and WCF (prototype)
Worth a look…Service Activity Generator
http://www.gotdotnet.com/workspaces/workspace.aspx?id=dd88e6eb-e889-4ed5-bc98-2e4e62953629Easier to remember:
http://tinyurl.com/ffq2z
Reads in a WCF service contact and generates a set of custom activities to consume the service.
It does not support receiving messages in workflows
Ten Architectural OpportunitiesIn no special order…1. Transactions
2. High frequency of change3. Business Rules4. Large data set in flow5. Web services6. Process Externalization7. Long Running Processes8. Auditing and analytics9. Human intervention 10. UI Flow
6. Process ExternalizationWorkflow Interop
Businesses orchestrate their private processesChoreography represents publicly observable behavior Organization B
Private Processes(Executable)
Public Process(Abstract)
Organization A
Private Processes(Executable)
Send PO
AckPO
POAccepted
POResponse
Import/export support in BizTalk 2004 and BizTalk 2006
BPEL 1.1 activities under development for Windows Workflow Foundation
Multiple workflow industry standards can be supported by WF
BPEL, XPDL, BPMN, others…
6. Process ExternalizationWorkflow Interop: BPEL
Ten Architectural OpportunitiesIn no special order…1. Transactions
2. High frequency of change3. Business Rules4. Large data set in flow5. Web services6. Process Externalization7. Long Running Processes8. Auditing and analytics9. Human intervention 10. UI Flow
7. Long Running ProcessesWF
Runtime services dehydrate/rehydrate the workflow
Set UnloadOnIdle prior to starting the workflowCode or config
WF does not impose a specific persistence service.
Define/customize your persistence architecture for specific types of hosts
Other runtime services:TrackingTransactionsThreading
Host Process
WindowsWorkflow Foundation
Runtime Engine
WorkflowActivity
Runtime Services
Base Activity Library
Custom Activity Library
Visual Designer
Ten Architectural OpportunitiesIn no special order…1. Transactions
2. High frequency of change3. Business Rules4. Large data set in flow5. Web services6. Process Externalization7. Long Running Processes8. Auditing and analytics9. Human intervention 10. UI Flow
How many units are waiting to be shipped right now?
What is the total value of my finished goods inventory today?
How much does it cost to produce one unit today?
What is the average throughput time for special orders right now? BizTalk Server
2004/2006 Engine
Tracking
Monitored Events and Messages
Excel Other Clients
Business Activity Monitoring (BAM)
8. Auditing and analyticsBizTalk
No BAM components here
Roll your own via WF TrackingTrack history of instance execution (running/suspended/terminated)Predict execution paths of future instancesCounters for KPI calculationsLog data, events and instances
Recognize limitations
8. Auditing and analyticsWF
Ten Architectural OpportunitiesIn no special order…1. Transactions
2. High frequency of change3. Business Rules4. Large data set in flow5. Web services6. Process Externalization7. Long Running Processes8. Auditing and analytics9. Human intervention 10. UI Flow
9. Human InterventionBizTalk
BTS2004: Human Workflow Services (HWS)HWS is deprecated in BTS2006
Use BizTalk with WF instead
Partners
Office 2007 Windows SPS Adapter for SharePoint
Ten Architectural OpportunitiesIn no special order…1. Transactions
2. High frequency of change3. Business Rules4. Large data set in flow5. Web services6. Process Externalization7. Long Running Processes8. Auditing and analytics9. Human intervention 10. UI Flow
Workflow traps UI events Workflow state drives the user experience
See WF State Machine sample
10.UI FlowWinForms (control flow)
“Smart Parts”
10.UI FlowComposite UI Application Block
10.UI Flow Page Flow in ASP.NET
Determine which page to serve up based upon state of the workflow Configure WorkflowWebHostingModule (HTTP Module) in Web.Config
Start workflow runtime and instanceCommunications between workflow and controller
Samples at www.windowsworkflow.netASP.NET team working on integration of WF into web projects
Ten Architectural Opportunities1. Transactions
2. High frequency of change3. Business Rules4. Large data set in flow5. Web services6. Process Externalization7. Long Running Processes8. Auditing and analytics9. Human intervention 10.UI Flow
A Workflow ManifestoWorkflow is everywhere
Workflow is expressive
Workflow is fluid
Workflow is inclusive
Workflow is transparent
© 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions,
it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.