SlideShare a Scribd company logo
Setup Visual Studio Rule 18
Workflow Foundation 4
10110000 01100001 What is WF4? MOV AL, 61h Console.WriteLine(Hello!);
Why is a picture better? Highlights missing/not completed areas Easy to Understand Patterns
Simplify complex patterns Multiple Branches Running in parallel
NO... It’s bigger than that So it’s a code visualiser?
Evolution
Code Activity Ruleset What was lost?
Isolation Workflow instances are isolated from the host application and each other. Workflows are not aware of information in the application other than what is passed to it. Threaded Instances are separately threaded from your main thread. Important Concepts
Workflow Foundation Demo
New Project -> .NET 4 -> Workflow Console App -> OK Drag a WriteLine on -> Set text to "Hello" Run (Ctrl+F5) single activity issue demo: Now try drag on another writeline Remove writeline, bring on a sequence and put two writelines with different messages Add Argument -> Name: Firstname, Direction: In, Type: string Drag a If on (should be only thing on surface) - condition is: String.IsNullOrWhiteSpace(FirstName) Drag a writeline to true and set text to: "Hello, stranger" Drag a writeline to false and set text to: "Hello, " & FirstName Run it - note that it runs stranger Program.cs - explain what is happening Change main to (Ctrl+1):    Workflow1 workflow = new Workflow1(); workflow.FirstName = "Robert"; WorkflowInvoker.Invoke(workflow); Run Create new PUBLIC class Person. Add string property FirstName. Build Delete the current workflow argument Add new arguement name=person, direction=in, type=Person Change if condition to: String.IsNullOrWhiteSpace(person.FirstName)  Change else writeline: "Hello, " & person.FirstName Build Change main to (Ctrl+2):    Person person = new Person(); person.FirstName = "Robert";   Workflow1 workflow = new Workflow1(); workflow.person = person; WorkflowInvoker.Invoke(workflow); Run and fail!
Change main to (Ctrl+3):   Person person = new Person(); person.FirstName = "Robert";   Dictionary<string, object> parameters = new Dictionary<string, object>(); parameters.Add("person", person);   Workflow1 workflow = new Workflow1(); WorkflowInvoker.Invoke(workflow, parameters); Run
Alternative Hosts
WorkflowInvoker.Invoke(new Workflow1()); Alternative Hosts WorkflowApplication wfApp = new WorkflowApplication(new Workflow1());wfApp.Run(); Uri uri = new Uri("http://localhost:8080/Workflow");WorkflowServiceHost wfHost = new WorkflowServiceHost(new Workflow1(), uri);wfHost.Open();
Types of Workflow Sequential State* Flow Chart * http://wf.codeplex.com/
Flow chart
Remove everything from workflow Drag a flow chart on Drag a flow decision Link start to decision Set decision condition to: String.IsNullOrWhiteSpace(person.FirstName) Show tooltop and tooltip sticky Drag two writelines on and link one to true and one to false true writeline text: "Hello, stranger" false writeline text: "Hello, " & person.FirstName Run Link false writeline to true writeline run
Custom activities
Add new item -> Code activity Set value to (Ctrl+4) public InArgument<string> FirstName { get; set; }         // If your activity returns a value, derive from CodeActivity<TResult>         // and return the value from the Execute method.         protected override void Execute(CodeActivityContext context)         {             // Obtain the runtime value of the Text input argument Console.WriteLine(this.FirstName.Get(context));         } Build Drag CodeActivity onto flowchart and link it to true writeline run
Passing Data Application Global Instance Variables Database, MSMQ, File, etc… Workflow
Services Person person = new Person();person.FirstName = "Robert";Dictionary<string, object> parameters = new Dictionary<string, object>();parameters.Add("person", person);Workflow1 workflow = new Workflow1();StringWriter writer = new StringWriter();WorkflowInvoker invoker = new WorkflowInvoker(workflow);invoker.Extensions.Add(writer);invoker.Invoke(parameters);
Services - Persistence Application Application Workflow Runtime Workflow Runtime Wait for event 2o kb Instance C 20 Mb - Executing Instance A 20Mb – 1 Week Instance C 20 Mb - Executing Instance B 20Mb – Event Delay 1 week 2o kb SQL Database Before After
Services - Persistence Application Application Workflow Runtime Workflow Runtime Wait for event 2o kb Instance B Sleeping 20Kb Instance C 20 Mb - Executing Instance A 20Mb – 1 Week Instance C 20 Mb - Executing Delay 1 week 2o kb SQL Database Before After
When? Persist On Idle Persist On Command No Persist Zones Options? Persist Only Persist + Unload Where? SQL Custom Services - Persistence
Allows the WF Engine to share/store information on the workflows.  Storage is, by default, to SQL but can be anywhere. Uses: Real time monitoring Reviewing completed workflows For Bugs/supporting For KPI/Metrics For Auditing Services - Tracking
Security Pack State Machine ADO.NET Migration Kit wf.codeplex.com

More Related Content

What's hot

Qtp training session IV
Qtp training session IVQtp training session IV
Qtp training session IVAisha Mazhar
 
Callable and runnable objects in ruby
Callable and runnable objects in rubyCallable and runnable objects in ruby
Callable and runnable objects in ruby
Rahul Bajaj
 
2. Design patterns. part #2
2. Design patterns. part #22. Design patterns. part #2
2. Design patterns. part #2
Leonid Maslov
 
JavaScript for real men
JavaScript for real menJavaScript for real men
JavaScript for real men
Ivano Malavolta
 
Ajax Part II
Ajax Part IIAjax Part II
Ajax Part II
Mukesh Tekwani
 
Test-Driven Development Overview
Test-Driven Development OverviewTest-Driven Development Overview
Test-Driven Development Overview
Rob Myers
 
Managing GraphQL servers with AWS Fargate & Prisma Cloud
Managing GraphQL servers  with AWS Fargate & Prisma CloudManaging GraphQL servers  with AWS Fargate & Prisma Cloud
Managing GraphQL servers with AWS Fargate & Prisma Cloud
Nikolas Burk
 
Getting Comfortable with JS Promises
Getting Comfortable with JS PromisesGetting Comfortable with JS Promises
Getting Comfortable with JS Promises
Asa Kusuma
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator Overloading
Nilesh Dalvi
 
Writing code that writes code - Nguyen Luong
Writing code that writes code - Nguyen LuongWriting code that writes code - Nguyen Luong
Writing code that writes code - Nguyen Luong
Vu Huy
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modeling
Codemotion
 
How AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design PatternsHow AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design Patterns
Ran Mizrahi
 
JavaScript promise
JavaScript promiseJavaScript promise
JavaScript promise
eslam_me
 
Presentation on overloading
Presentation on overloading Presentation on overloading
Presentation on overloading Charndeep Sekhon
 
2CPP10 - Polymorphism
2CPP10 - Polymorphism2CPP10 - Polymorphism
2CPP10 - Polymorphism
Michael Heron
 
JavaOne 2013: Java 8 - The Good Parts
JavaOne 2013: Java 8 - The Good PartsJavaOne 2013: Java 8 - The Good Parts
JavaOne 2013: Java 8 - The Good Parts
Konrad Malawski
 
J query
J queryJ query
C++ Windows Forms L06 - Utlitity and Strings
C++ Windows Forms L06 - Utlitity and StringsC++ Windows Forms L06 - Utlitity and Strings
C++ Windows Forms L06 - Utlitity and Strings
Mohammad Shaker
 
JavaScript Promises
JavaScript PromisesJavaScript Promises
JavaScript Promises
Derek Willian Stavis
 

What's hot (20)

Qtp training session IV
Qtp training session IVQtp training session IV
Qtp training session IV
 
Callable and runnable objects in ruby
Callable and runnable objects in rubyCallable and runnable objects in ruby
Callable and runnable objects in ruby
 
2. Design patterns. part #2
2. Design patterns. part #22. Design patterns. part #2
2. Design patterns. part #2
 
JavaScript for real men
JavaScript for real menJavaScript for real men
JavaScript for real men
 
Ajax Part II
Ajax Part IIAjax Part II
Ajax Part II
 
Test-Driven Development Overview
Test-Driven Development OverviewTest-Driven Development Overview
Test-Driven Development Overview
 
Managing GraphQL servers with AWS Fargate & Prisma Cloud
Managing GraphQL servers  with AWS Fargate & Prisma CloudManaging GraphQL servers  with AWS Fargate & Prisma Cloud
Managing GraphQL servers with AWS Fargate & Prisma Cloud
 
Getting Comfortable with JS Promises
Getting Comfortable with JS PromisesGetting Comfortable with JS Promises
Getting Comfortable with JS Promises
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator Overloading
 
Writing code that writes code - Nguyen Luong
Writing code that writes code - Nguyen LuongWriting code that writes code - Nguyen Luong
Writing code that writes code - Nguyen Luong
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modeling
 
How AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design PatternsHow AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design Patterns
 
Javascript talk
Javascript talkJavascript talk
Javascript talk
 
JavaScript promise
JavaScript promiseJavaScript promise
JavaScript promise
 
Presentation on overloading
Presentation on overloading Presentation on overloading
Presentation on overloading
 
2CPP10 - Polymorphism
2CPP10 - Polymorphism2CPP10 - Polymorphism
2CPP10 - Polymorphism
 
JavaOne 2013: Java 8 - The Good Parts
JavaOne 2013: Java 8 - The Good PartsJavaOne 2013: Java 8 - The Good Parts
JavaOne 2013: Java 8 - The Good Parts
 
J query
J queryJ query
J query
 
C++ Windows Forms L06 - Utlitity and Strings
C++ Windows Forms L06 - Utlitity and StringsC++ Windows Forms L06 - Utlitity and Strings
C++ Windows Forms L06 - Utlitity and Strings
 
JavaScript Promises
JavaScript PromisesJavaScript Promises
JavaScript Promises
 

Viewers also liked

Scalable web-based workflow platform
Scalable web-based workflow platformScalable web-based workflow platform
Scalable web-based workflow platform
Ashutosh Bijoor
 
workflow in temporal state machine v1
workflow in temporal state machine v1workflow in temporal state machine v1
workflow in temporal state machine v1
Gordon Morrison
 
State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...
State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...
State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...
European SharePoint Conference
 
Events Workflow diagram
Events Workflow diagramEvents Workflow diagram
Events Workflow diagramColin Thomson
 
Corporate Workflow Process - Complaints and Legal Matters (illustration)
Corporate Workflow Process - Complaints and Legal Matters (illustration)Corporate Workflow Process - Complaints and Legal Matters (illustration)
Corporate Workflow Process - Complaints and Legal Matters (illustration)
Elizabeth Baker, JD, CRCMP
 
The Workflow Reference Model
The Workflow Reference ModelThe Workflow Reference Model
The Workflow Reference Model
Aldo Quelopana
 
Neuro4j Workflow Overview
Neuro4j Workflow OverviewNeuro4j Workflow Overview
Neuro4j Workflow Overview
Dmytro Pavlikovskiy
 
Djangocon 09 Presentation - Pluggable Applications
Djangocon 09 Presentation - Pluggable ApplicationsDjangocon 09 Presentation - Pluggable Applications
Djangocon 09 Presentation - Pluggable Applications
Nowell Strite
 
Cognitive IBM Watson Services for Bluemix Developers
Cognitive IBM Watson Services for Bluemix DevelopersCognitive IBM Watson Services for Bluemix Developers
Cognitive IBM Watson Services for Bluemix Developers
Niklas Heidloff
 
A simple workflow system using state machines
A simple workflow system using state machinesA simple workflow system using state machines
A simple workflow system using state machines
dhpeterson
 
Java workflow engines
Java workflow enginesJava workflow engines
Java workflow engines
Mohammed Fazuluddin
 

Viewers also liked (13)

Scalable web-based workflow platform
Scalable web-based workflow platformScalable web-based workflow platform
Scalable web-based workflow platform
 
workflow in temporal state machine v1
workflow in temporal state machine v1workflow in temporal state machine v1
workflow in temporal state machine v1
 
State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...
State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...
State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...
 
Windows Workflow Foundation
Windows Workflow FoundationWindows Workflow Foundation
Windows Workflow Foundation
 
Events Workflow diagram
Events Workflow diagramEvents Workflow diagram
Events Workflow diagram
 
Workflow for XPages
Workflow for XPagesWorkflow for XPages
Workflow for XPages
 
Corporate Workflow Process - Complaints and Legal Matters (illustration)
Corporate Workflow Process - Complaints and Legal Matters (illustration)Corporate Workflow Process - Complaints and Legal Matters (illustration)
Corporate Workflow Process - Complaints and Legal Matters (illustration)
 
The Workflow Reference Model
The Workflow Reference ModelThe Workflow Reference Model
The Workflow Reference Model
 
Neuro4j Workflow Overview
Neuro4j Workflow OverviewNeuro4j Workflow Overview
Neuro4j Workflow Overview
 
Djangocon 09 Presentation - Pluggable Applications
Djangocon 09 Presentation - Pluggable ApplicationsDjangocon 09 Presentation - Pluggable Applications
Djangocon 09 Presentation - Pluggable Applications
 
Cognitive IBM Watson Services for Bluemix Developers
Cognitive IBM Watson Services for Bluemix DevelopersCognitive IBM Watson Services for Bluemix Developers
Cognitive IBM Watson Services for Bluemix Developers
 
A simple workflow system using state machines
A simple workflow system using state machinesA simple workflow system using state machines
A simple workflow system using state machines
 
Java workflow engines
Java workflow enginesJava workflow engines
Java workflow engines
 

Similar to Workflow Foundation 4

Twins: Object Oriented Programming and Functional Programming
Twins: Object Oriented Programming and Functional ProgrammingTwins: Object Oriented Programming and Functional Programming
Twins: Object Oriented Programming and Functional Programming
RichardWarburton
 
TWINS: OOP and FP - Warburton
TWINS: OOP and FP - WarburtonTWINS: OOP and FP - Warburton
TWINS: OOP and FP - Warburton
Codemotion
 
Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++
ppd1961
 
eXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction TrainingeXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction Training
Hoat Le
 
Javascript Best Practices
Javascript Best PracticesJavascript Best Practices
Javascript Best Practices
Christian Heilmann
 
Angular Schematics
Angular SchematicsAngular Schematics
Angular Schematics
Christoffer Noring
 
Understanding Framework Architecture using Eclipse
Understanding Framework Architecture using EclipseUnderstanding Framework Architecture using Eclipse
Understanding Framework Architecture using Eclipse
anshunjain
 
WF 4.0 Overview
WF 4.0 OverviewWF 4.0 Overview
WF 4.0 Overview
dannicola
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
Guillaume Laforge
 
Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Python
gturnquist
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLsintelliyole
 
Parallel Programming With Dot Net
Parallel Programming With Dot NetParallel Programming With Dot Net
Parallel Programming With Dot Net
Neeraj Kaushik
 
Junit in mule demo
Junit in mule demoJunit in mule demo
Junit in mule demo
Sudha Ch
 
Exploring SharePoint with F#
Exploring SharePoint with F#Exploring SharePoint with F#
Exploring SharePoint with F#Talbott Crowell
 
Fun Teaching MongoDB New Tricks
Fun Teaching MongoDB New TricksFun Teaching MongoDB New Tricks
Fun Teaching MongoDB New Tricks
MongoDB
 
Module design pattern i.e. express js
Module design pattern i.e. express jsModule design pattern i.e. express js
Module design pattern i.e. express js
Ahmed Assaf
 
Ondemand scaling-aws
Ondemand scaling-awsOndemand scaling-aws
Ondemand scaling-aws
Iegor Fadieiev
 
Oop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer MelayiOop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer Melayi
Muhammed Thanveer M
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
Dave Bost
 
The Ring programming language version 1.9 book - Part 99 of 210
The Ring programming language version 1.9 book - Part 99 of 210The Ring programming language version 1.9 book - Part 99 of 210
The Ring programming language version 1.9 book - Part 99 of 210
Mahmoud Samir Fayed
 

Similar to Workflow Foundation 4 (20)

Twins: Object Oriented Programming and Functional Programming
Twins: Object Oriented Programming and Functional ProgrammingTwins: Object Oriented Programming and Functional Programming
Twins: Object Oriented Programming and Functional Programming
 
TWINS: OOP and FP - Warburton
TWINS: OOP and FP - WarburtonTWINS: OOP and FP - Warburton
TWINS: OOP and FP - Warburton
 
Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++
 
eXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction TrainingeXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction Training
 
Javascript Best Practices
Javascript Best PracticesJavascript Best Practices
Javascript Best Practices
 
Angular Schematics
Angular SchematicsAngular Schematics
Angular Schematics
 
Understanding Framework Architecture using Eclipse
Understanding Framework Architecture using EclipseUnderstanding Framework Architecture using Eclipse
Understanding Framework Architecture using Eclipse
 
WF 4.0 Overview
WF 4.0 OverviewWF 4.0 Overview
WF 4.0 Overview
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
 
Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Python
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
 
Parallel Programming With Dot Net
Parallel Programming With Dot NetParallel Programming With Dot Net
Parallel Programming With Dot Net
 
Junit in mule demo
Junit in mule demoJunit in mule demo
Junit in mule demo
 
Exploring SharePoint with F#
Exploring SharePoint with F#Exploring SharePoint with F#
Exploring SharePoint with F#
 
Fun Teaching MongoDB New Tricks
Fun Teaching MongoDB New TricksFun Teaching MongoDB New Tricks
Fun Teaching MongoDB New Tricks
 
Module design pattern i.e. express js
Module design pattern i.e. express jsModule design pattern i.e. express js
Module design pattern i.e. express js
 
Ondemand scaling-aws
Ondemand scaling-awsOndemand scaling-aws
Ondemand scaling-aws
 
Oop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer MelayiOop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer Melayi
 
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for DevelopersMSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
MSDN Presents: Visual Studio 2010, .NET 4, SharePoint 2010 for Developers
 
The Ring programming language version 1.9 book - Part 99 of 210
The Ring programming language version 1.9 book - Part 99 of 210The Ring programming language version 1.9 book - Part 99 of 210
The Ring programming language version 1.9 book - Part 99 of 210
 

More from Robert MacLean

14 things you need to be a successful software developer (v3)
14 things you need to be a successful software developer (v3)14 things you need to be a successful software developer (v3)
14 things you need to be a successful software developer (v3)
Robert MacLean
 
Git
GitGit
OWASP TOP 10
OWASP TOP 10OWASP TOP 10
OWASP TOP 10
Robert MacLean
 
Building a µservice with Kotlin, Micronaut & GCP
Building a µservice with Kotlin, Micronaut & GCPBuilding a µservice with Kotlin, Micronaut & GCP
Building a µservice with Kotlin, Micronaut & GCP
Robert MacLean
 
Looking at the Vue
Looking at the VueLooking at the Vue
Looking at the Vue
Robert MacLean
 
Kotlin 101
Kotlin 101Kotlin 101
Kotlin 101
Robert MacLean
 
Features of Kotlin I find exciting
Features of Kotlin I find excitingFeatures of Kotlin I find exciting
Features of Kotlin I find exciting
Robert MacLean
 
JavaScript Gotchas
JavaScript GotchasJavaScript Gotchas
JavaScript Gotchas
Robert MacLean
 
DevConf Survival Guide
DevConf Survival GuideDevConf Survival Guide
DevConf Survival Guide
Robert MacLean
 
The state of testing @ Microsoft
The state of testing @ MicrosoftThe state of testing @ Microsoft
The state of testing @ Microsoft
Robert MacLean
 
Visual Studio ❤ JavaScript
Visual Studio ❤ JavaScriptVisual Studio ❤ JavaScript
Visual Studio ❤ JavaScript
Robert MacLean
 
What is new in C# 6?
What is new in C# 6?What is new in C# 6?
What is new in C# 6?
Robert MacLean
 
Putting the DOT in .NET - Dev/Ops/Test
Putting the DOT in .NET - Dev/Ops/TestPutting the DOT in .NET - Dev/Ops/Test
Putting the DOT in .NET - Dev/Ops/Test
Robert MacLean
 
A Developer Day 2014 - Durban
A Developer Day 2014 - Durban A Developer Day 2014 - Durban
A Developer Day 2014 - Durban
Robert MacLean
 
Agile lessons learned in the Microsoft ALM Rangers
Agile lessons learned in the Microsoft ALM RangersAgile lessons learned in the Microsoft ALM Rangers
Agile lessons learned in the Microsoft ALM Rangers
Robert MacLean
 
Hour of code - Train the trainer
Hour of code - Train the trainerHour of code - Train the trainer
Hour of code - Train the trainer
Robert MacLean
 
Building services for apps on a shoestring budget
Building services for apps on a shoestring budgetBuilding services for apps on a shoestring budget
Building services for apps on a shoestring budget
Robert MacLean
 
3 things your app API is doing WRONG
3 things your app API is doing WRONG3 things your app API is doing WRONG
3 things your app API is doing WRONG
Robert MacLean
 
ASP.NET
ASP.NETASP.NET
LightSwitch
LightSwitchLightSwitch
LightSwitch
Robert MacLean
 

More from Robert MacLean (20)

14 things you need to be a successful software developer (v3)
14 things you need to be a successful software developer (v3)14 things you need to be a successful software developer (v3)
14 things you need to be a successful software developer (v3)
 
Git
GitGit
Git
 
OWASP TOP 10
OWASP TOP 10OWASP TOP 10
OWASP TOP 10
 
Building a µservice with Kotlin, Micronaut & GCP
Building a µservice with Kotlin, Micronaut & GCPBuilding a µservice with Kotlin, Micronaut & GCP
Building a µservice with Kotlin, Micronaut & GCP
 
Looking at the Vue
Looking at the VueLooking at the Vue
Looking at the Vue
 
Kotlin 101
Kotlin 101Kotlin 101
Kotlin 101
 
Features of Kotlin I find exciting
Features of Kotlin I find excitingFeatures of Kotlin I find exciting
Features of Kotlin I find exciting
 
JavaScript Gotchas
JavaScript GotchasJavaScript Gotchas
JavaScript Gotchas
 
DevConf Survival Guide
DevConf Survival GuideDevConf Survival Guide
DevConf Survival Guide
 
The state of testing @ Microsoft
The state of testing @ MicrosoftThe state of testing @ Microsoft
The state of testing @ Microsoft
 
Visual Studio ❤ JavaScript
Visual Studio ❤ JavaScriptVisual Studio ❤ JavaScript
Visual Studio ❤ JavaScript
 
What is new in C# 6?
What is new in C# 6?What is new in C# 6?
What is new in C# 6?
 
Putting the DOT in .NET - Dev/Ops/Test
Putting the DOT in .NET - Dev/Ops/TestPutting the DOT in .NET - Dev/Ops/Test
Putting the DOT in .NET - Dev/Ops/Test
 
A Developer Day 2014 - Durban
A Developer Day 2014 - Durban A Developer Day 2014 - Durban
A Developer Day 2014 - Durban
 
Agile lessons learned in the Microsoft ALM Rangers
Agile lessons learned in the Microsoft ALM RangersAgile lessons learned in the Microsoft ALM Rangers
Agile lessons learned in the Microsoft ALM Rangers
 
Hour of code - Train the trainer
Hour of code - Train the trainerHour of code - Train the trainer
Hour of code - Train the trainer
 
Building services for apps on a shoestring budget
Building services for apps on a shoestring budgetBuilding services for apps on a shoestring budget
Building services for apps on a shoestring budget
 
3 things your app API is doing WRONG
3 things your app API is doing WRONG3 things your app API is doing WRONG
3 things your app API is doing WRONG
 
ASP.NET
ASP.NETASP.NET
ASP.NET
 
LightSwitch
LightSwitchLightSwitch
LightSwitch
 

Recently uploaded

GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 

Recently uploaded (20)

GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 

Workflow Foundation 4

  • 3. 10110000 01100001 What is WF4? MOV AL, 61h Console.WriteLine(Hello!);
  • 4. Why is a picture better? Highlights missing/not completed areas Easy to Understand Patterns
  • 5. Simplify complex patterns Multiple Branches Running in parallel
  • 6. NO... It’s bigger than that So it’s a code visualiser?
  • 8. Code Activity Ruleset What was lost?
  • 9. Isolation Workflow instances are isolated from the host application and each other. Workflows are not aware of information in the application other than what is passed to it. Threaded Instances are separately threaded from your main thread. Important Concepts
  • 11. New Project -> .NET 4 -> Workflow Console App -> OK Drag a WriteLine on -> Set text to "Hello" Run (Ctrl+F5) single activity issue demo: Now try drag on another writeline Remove writeline, bring on a sequence and put two writelines with different messages Add Argument -> Name: Firstname, Direction: In, Type: string Drag a If on (should be only thing on surface) - condition is: String.IsNullOrWhiteSpace(FirstName) Drag a writeline to true and set text to: "Hello, stranger" Drag a writeline to false and set text to: "Hello, " & FirstName Run it - note that it runs stranger Program.cs - explain what is happening Change main to (Ctrl+1): Workflow1 workflow = new Workflow1(); workflow.FirstName = "Robert"; WorkflowInvoker.Invoke(workflow); Run Create new PUBLIC class Person. Add string property FirstName. Build Delete the current workflow argument Add new arguement name=person, direction=in, type=Person Change if condition to: String.IsNullOrWhiteSpace(person.FirstName) Change else writeline: "Hello, " & person.FirstName Build Change main to (Ctrl+2): Person person = new Person(); person.FirstName = "Robert"; Workflow1 workflow = new Workflow1(); workflow.person = person; WorkflowInvoker.Invoke(workflow); Run and fail!
  • 12. Change main to (Ctrl+3): Person person = new Person(); person.FirstName = "Robert"; Dictionary<string, object> parameters = new Dictionary<string, object>(); parameters.Add("person", person); Workflow1 workflow = new Workflow1(); WorkflowInvoker.Invoke(workflow, parameters); Run
  • 14. WorkflowInvoker.Invoke(new Workflow1()); Alternative Hosts WorkflowApplication wfApp = new WorkflowApplication(new Workflow1());wfApp.Run(); Uri uri = new Uri("http://localhost:8080/Workflow");WorkflowServiceHost wfHost = new WorkflowServiceHost(new Workflow1(), uri);wfHost.Open();
  • 15. Types of Workflow Sequential State* Flow Chart * http://wf.codeplex.com/
  • 17. Remove everything from workflow Drag a flow chart on Drag a flow decision Link start to decision Set decision condition to: String.IsNullOrWhiteSpace(person.FirstName) Show tooltop and tooltip sticky Drag two writelines on and link one to true and one to false true writeline text: "Hello, stranger" false writeline text: "Hello, " & person.FirstName Run Link false writeline to true writeline run
  • 19. Add new item -> Code activity Set value to (Ctrl+4) public InArgument<string> FirstName { get; set; } // If your activity returns a value, derive from CodeActivity<TResult> // and return the value from the Execute method. protected override void Execute(CodeActivityContext context) { // Obtain the runtime value of the Text input argument Console.WriteLine(this.FirstName.Get(context)); } Build Drag CodeActivity onto flowchart and link it to true writeline run
  • 20. Passing Data Application Global Instance Variables Database, MSMQ, File, etc… Workflow
  • 22. Services - Persistence Application Application Workflow Runtime Workflow Runtime Wait for event 2o kb Instance C 20 Mb - Executing Instance A 20Mb – 1 Week Instance C 20 Mb - Executing Instance B 20Mb – Event Delay 1 week 2o kb SQL Database Before After
  • 23. Services - Persistence Application Application Workflow Runtime Workflow Runtime Wait for event 2o kb Instance B Sleeping 20Kb Instance C 20 Mb - Executing Instance A 20Mb – 1 Week Instance C 20 Mb - Executing Delay 1 week 2o kb SQL Database Before After
  • 24. When? Persist On Idle Persist On Command No Persist Zones Options? Persist Only Persist + Unload Where? SQL Custom Services - Persistence
  • 25. Allows the WF Engine to share/store information on the workflows. Storage is, by default, to SQL but can be anywhere. Uses: Real time monitoring Reviewing completed workflows For Bugs/supporting For KPI/Metrics For Auditing Services - Tracking
  • 26. Security Pack State Machine ADO.NET Migration Kit wf.codeplex.com