Windows Workflow 4

Download Windows Workflow 4

Post on 10-Feb-2016

30 views

Category:

Documents

2 download

Embed Size (px)

DESCRIPTION

Windows Workflow 4. Introducing Windows Workflow Foundation 4 in VS 2010. Philip Nelson http://panmanphil.wordpress.com Science Officer PAi panmanphil@yahoo.com. Why Are We Here?. I am interested how to coordinate people and systems to get stuff done Each on their own timelines - PowerPoint PPT Presentation

TRANSCRIPT

Windows Workflow 4Introducing Windows Workflow Foundation 4 in VS 20101Philip Nelsonhttp://panmanphil.wordpress.comScience Officer PAipanmanphil@yahoo.com

Why Are We Here?I am interested how to coordinate people and systems to get stuff done Each on their own timelinesI am interested in graphical programming tools that help communicate what software does to othersI am interested in programming that is more responsive to changes at runtime

Ive been working with workflow since the 1990s, including building a custom engine in use since 2003Decided to take a deep dive into WWF4 late last yearHow many of you have worked with WWF or WWF4? Workflow?

3Why is Microsoft here?Microsoft continues to invest in workflow. WWF1 3 and now WWF4Even though developers hate workflow

Why?

I can write software that does business processes without any fancy workflow tools Workflow is just handling the events when something happens and coding what should happen nextIsnt that what BI is for?Examples of various business apps: save the order scan the BOL Time passes.. Why does it take 5 days to get the order out? Was it expedited, was it given a promotion, did they get the free shipping?

5

It is all the things that are part of the process that arent part of the code that are interestingWho really owns these processes that we all acknowledge exist?How do you get that higher level view so you can understand how to improve the processes later?Can our systems deliver information on how our processes are doing more than how our systems are doing?Can we work towards refactoring our business more than refactoring our code?What happens with all those reports that we whine about writing? Are decisions about how to operate the business being made on metrics from these reports and could this be more automated?

This is what is interesting. Workflow is a way of thinking about systems that help support these ideas. 6

Our code is complicated by having to represent all the state transistions and the systems they point to. 7OverviewMicrosoft isnt very clear about the strategy but.They are aligned with the rest of the very lucrative BPM industry that is trying to get more involvement from business users in system development

8OverviewToday, WWF 4 is a developer tool first and foremost

While BPM systems are mostly sold to businesses, MS is still selling to developers mostly.

Well do a decent tour of the basicsWell cover visual designers, flow control, messaging, variables, arguments, and collectionsWell look at examples and test them with unit testsWell tour some of the execution environments available

9Lets see some codeI will make the assumption that most of your are professional developers without much experience in wwf4.

Show the environmentcreate a workflow with a sequence in a console in in FlowchartWorkflow projectRun through some activities to show visual designersPoint out variables, arguments, collections with activitiesShow the VB expressions

Open demo projectShow testShow workflow sequence Execute via workflow invoke

Show a flowchart activity

Show the collections project and strong typed collection access

Show a coded workflow

Show a Pick activity and talk about Receive and Send and Branches

10TrackingD:\projects\WF_WCF_Samples\WF\Application\VisualWorkflowTracking\CS11ExecutionD:\projects\WF_WCF_Samples\WF\Basic\Execution\ControllingWorkflowApplications

Talk about the WorkflowInvokerTalk about the WorkflowApplicationTalk about ActivityXamlServices

Talk about the IIS hosted and WCF Workflow project types

Talk about AppFabric12HighlightsActivities can be composedEverything is an activityParallel execution is natural actGoing idle and restoring is a natural actThe designer can be hosted in other apps andWorkflows can be loaded dynamically from xaml

HighlightsFast and adept up and down in scaleInstance startup can be as quick as 4ms (500ms without caching though) K2 process startup at Pai is more like 250ms

Unlike most systems, you could effectively run in memory synchronous workflows for wizards15ChallengesThough AppFabric may help, instance management is not on par with other commercial productsTracking remains always involves custom coding with tracking eventsChallengesThere is no obvious path to debugging an existing workflow in flight, resetting its path or variables. While it could be said to be an advantage, WWF4 provides nothing for end user UIHard to imagine managing hundreds of workflows with tens of thousands of instancesWhat are the essentials of workflowgood design for incorporating people with contextual information into a workflowgood design for incorporating back end systems and purchased applications into a workflowability to see progress of workflow in flight and manage instances (errors, restarts, escalations) productive design environment

What is the UI the end user lives in? Email, sharepoint, custom apps, CRM, ERP. All provide context

18What are the essentials of workflowStable Execution EnvironmentClear metrics of processes and performanceability to safely deploy new versions of long running workflows

Some would argue document management is essential

19How does it stack up to other products?Very weak in terms of management. Very weak in terms of built in connectors. No out of the box UI tools.

This would be sold to a solution provider, where most products are sold to businesses.

Feels like a very solid but very minimal framework to build a real product on

20How does it compare to SharePoint workflow?There is almost nothing comparable! SP workflows are really just for manipulating internal sharepoint objects. 21How does it compare to Windows Workflow Foundation 3?Wwf4 is a complete rewrite

No state machine though there is a Codeplex project to add one

No upgrade path, only a partially effective interop activity to call WWF3 from WWF4 activities.

There wasnt much uptake in WWF3 so the feeling is the MS left people to upgrade on their own

With AppFabric and the 3 hosting options, there is much more out of the box hosting options22More Informationhttp://www.delicious.com/panmanphil/workflowhttp://www.delicious.com/panmanphil/wwf4Ron Jacobs video on channel 9Ron Jacobs wrote a VS2010 guidance packageThe Problem Solver blog, http://msmvps.com/blogs/theproblemsolver/default.aspxMSDN samples - http://msdn.microsoft.com/en-us/library/dd483375(VS.100).aspxShow the samples23Philip Nelsonhttp://panmanphil.wordpress.comScience Officer PAipanmanphil@yahoo.com