C# Advanced L10-Workflow Foundation

Post on 13-Jan-2015

295 views 2 download

Tags:

description

C# Advanced L10-Workflow Foundation

Transcript of C# Advanced L10-Workflow Foundation

Mohammad Shaker

mohammadshaker.com

@ZGTRShaker

2011, 2012, 2013, 2014

C# AdvancedL11-Windows Workflow Foundation (WF)

Windows Workflow Foundation (WF)

Windows Workflow FoundationWindows Workflow Foundation is a framework that enables users to create

system or human workflows in their applications

Scenarios• Enabling workflow within line-of-business applications.

• User-interface page flows.

• Document-centric workflows.

• Human workflows.

• Composite workflows for service-oriented applications.

• Business rule-driven workflows.

• Workflows for systems management.

Workflow Runtime Engine

Source: http://msdn.microsoft.com/en-us/library/vstudio/aa349006(v=vs.90).aspx

Creating WF Project

Creating WF Project

Workflow Console Application

A Workflow

• A workflow is a class

• A workflow class may be defined in markup

11

using System.Workflow.Activities;

public class MyWorkflow: SequentialWorkflow

{

}

<?Mapping XmlNamespace="Activities" ClrNamespace="System.Workflow.Activities" Assembly="System.Workflow.Activities" ?>

<SequentialWorkflow x:Class="MyWorkflow" xmlns="Activities" xmlns:x="Definition">

</SequentialWorkflow>

Take a Look at MSDN TutorialThe application is a simple expense report that consists of a text field to enter an amount and a button to submit the expense report. The

workflow uses rules to evaluate the amount and to require approval from a lead if the amount is less than 1000, or approval from a manager if the amount is greater than or equal to 1000. If approval is needed, the workflow communicates back to the application and displays a drop-

down panel that contains Approve and Reject buttons. When one of these buttons is clicked, the application notifies the workflow of the response, and the workflow continues to process the event.

http://msdn.microsoft.com/en-us/library/vstudio/ms734794(v=vs.90).aspx

Quick Crazy Workflow

Workflow Tutorial

Workflow Tutorial

Sequence, Assign and If

Control flow

Workflow Tutorial

http://www.mohammadshaker.com

mohammadshakergtr@gmail.com

https://twitter.com/ZGTRShaker @ZGTRShaker

https://de.linkedin.com/pub/mohammad-shaker/30/122/128/

http://www.slideshare.net/ZGTRZGTR

https://www.goodreads.com/user/show/11193121-mohammad-shaker

https://plus.google.com/u/0/+MohammadShaker/

https://www.youtube.com/channel/UCvJUfadMoEaZNWdagdMyCRA

http://mohammadshakergtr.wordpress.com/