Workflow Manager - a technical overview (Sam Vanhoutte)

Post on 22-Jan-2015

4.017 views 5 download

description

Workflow manager was shipped together with Service Bus for Windows Server as part of the major SharePoint 2013 release. Microsoft workflow manager is built to host and manage workflows in a multi-tenant environment at a high scale, such as Windows Azure. In this session, Sam will give an architectural overview of Workflow Manager and position it in various scenarios. It will also be compared WCF Workflow Services. The concepts of custom activities, deployment, management and workflow hierarchy will be explained. A cloud-based workflow solution will be demonstrated, showing integration between Windows Azure Service Bus, Workflow Manager, Windows Azure BizTalk Services and on premises systems. After the session, attendees should be able to understand the capabilities of Workflow Manager and should have seen how to build distributed workflows in a scalable cloud environment.

Transcript of Workflow Manager - a technical overview (Sam Vanhoutte)

Workflow ManagerRunning durable workflows in the cloud and on prem

Nice to meet youSam VANHOUTTECTO

BizTalk V-TSPIntegration MVP

sam.vanhoutte@codit.eu+32 474 849 993@SamVanhoutte

be.linkedin.com/in/

samvanhoutte/

> 60 Active integration customers

International Focus - HQ in BEFocused on integration solutions

2000 Belgium2004 France2013 Portugal

60 employees > 50 consultants BizTalk certifiede-news + SoMe

2012 & 2013

Partner of the Year

Award FinalistApplication Integration

Agenda• Microsoft & Workflow – a long

history• Workflow designer, activities• AppFabric Workflow Services

• Workflow Manager• Architecture• Multi-tenancy & isolation• Pub / sub• Demo

• Conclusions

Microsoft & Workflow

A bit of history

Workflow history

Oslo

Repository, M, Quadrant

AppFabric

WCF Workflow Services

Azure Workflow

Service Bus &

SharePoint

2004 > 2007 - 2010 2010 > 2013 >BizTalk Server

XLANG/s

Integration BPEL Modeling SOA What’s

Next?

The ART of Workflow*

* Copyright : Dave Cliffe : Program Manager Workflow

➔ Declarative authoring of programs that coordinate work, using:

➔ Activities➔ Runtime➔ Tooling

Workflow improvements in .NET 4.5

Authoring ImprovementsBe more efficient when authoring your workflows

VersioningBasic building blocks to enable building a versioning story

Runtime EnhancementsImprove runtime performance and extensibility

C# Expressions, Designer Improvements,

State Machine,Contract-First

Workflow Identity, Side by Side Versioning,

Dynamic Update

VB Expressions Performance,

Expressions Extensibility, Partial Trust

Improvements across

Activities, Runtime, and Tooling

8

AppFabric for Windows ServerWCF WorkflowServiceHost

➔ Hosting Services➔ Hosting Workflows➔ Caching

➔ AppFabric connect forBizTalk Server

Code named: Dublin & Velocity

Windows Server

.NET Framework

Windows Server AppFabric

Services

Management Tools

IIS/WAS

Workflows

Runtime DatabasesPersistence Monitoring

HostingPersistence CachingMonitoring

IIS Manager Modules

PowerShell

9

DemoAppFabric Workflows & BizTalk

AppFabric WF

BizTalk orch.Senti

net Get

Create

Workflow ManagerAn overview

What is Workflow Manager?

➔ Scale & Reliability➔ Multi-tenancy➔ Cloud-based Messaging➔ Turnkey➔ WF4 Prog Model

HTTP &HTTPS

WF

WF Backend(.EXE)

WF Gateway(IIS)

.NET ClientSB

Service Bus

WF Resources

Activity Prog Model

Core Runtime

Activity Prog Model

Design goals

Hosting .NET Workflows .NET 4+------------------------WF Manager

• Host application integration• WF-driven UI

• Systems integration• Service-based architecture

• Async execution of a single workflow instance with bookmarks and tracking

• Explicit, fine-grained control of the WF runtime

• Async execution of multiple workflow instances of a single definition

• Supports durable timers, persistence, tracking, WCF SOAP, correlation, etc.

WorkflowApplicationActivity Prog Model

Core Runtime

Host Services

WorkflowServiceHostActivity Prog Model

Core Runtime

Host Services

• Extensible SaaS applications

• Multi-tenant, scalable hosting of workflows• Turnkey artifact management• Supports durable timers, persistence, HTTP,

pub/sub using Service Bus, etc.

Workflow ManagerActivity Prog Model

Core Runtime

Host Services

Hosting .NET workflows

Architecture

14

Deployment diagram

Workflow Manager Infrastructure

IISOne App Pool: WorkflowMgmtPool

One site:Workflow Management Site

Windows Services

WorkflowService BackendServiceBus BackendServiceBus GatewayFabricHostSvc

SQL

Workflow Databases• WFManagementDB• WFInstanceManagementD

B• WFResourceManagementD

B

Service Bus Databases• SBManagementDB• SBGatewayDatabase• SBMessageContainerxx

Installing WF Manager

➔ Install➔ Using WEB Platform Installer (or download center)➔ Supported on Windows Server 2012, Windows 8,

Azure VMs➔ Configure

➔ Using configuration wizard or PowerShell➔ Create / Join a Farm (high availability / scale-out)

➔ Supported back-ends➔ SQL Server (Express + higher) & SQL Azure➔ Service Bus 1.0 for Windows Server (not service!)

Testing & Debugging

Microsoft.Workflow.TestServiceHost

18

➔ Part of Workflow Manager Tools for Visual Studio (2012 only!)

➔ TestService (console app) ➔ Deploy & run workflows in it➔ Attach Visual Studio to the process➔ Update exe.config

➔ Some limitations

Multi-tenancy Through scopes & isolation

Scopes

➔ Workflow manager scope➔ Dedicated service bus topic➔ Gets created at deployment of first

workflow➔ “A scope is a named and

securable container for Activities, Workflows, Instances, configuration and child Scopes.”

Root

Tenant01

HRM

Sales

Tenant02

Production

TenantXX

Sandboxing

21

Workflow Manager 1.0 Trusted Surface

➔ Set of trusted types & activities➔ Fully declarative authoring

➔ Compositie custom activities possible➔ Whitelisting custom activities possible

➔ AllowedTypes.xml (WFWebRoot\bin & Artifacts folder)➔ Disable sandboxing

• Set-WFServiceConfiguration –ServiceUri:https://server:12290 –Name:WorkflowServiceAllowUnsafeTypes -Value:true

Sandboxing

.NET Data Types

• String• DateTime & TimeSpan• Int32 & Double• Boolean• Guid• ICollection & IList• IDictionary & KeyValuePair• DynamicValue• Exception• Uri

WF Manager activities

• Dynamic Value• Http Activities• Pub/Sub Activities• Time Activities• Configuration & External

variables• Data Type functions

System.Activities, except:

• InvokeMethod• New• Cast• VisualBasicValue,

VisualBasicReference• LambdaValue,

LambdaRefernce• TransactionScope• Persist

22

Workflow Manager 1.0 Trusted Surface

Using complex data structures➔ Recursive key-value pairs➔ Address, using paths

➔ Customer/FirstName > John➔ Company > Contoso➔ Regions(2) > LA

23

DynamicValues

Name ValueCustomer Name Value

FirstName JohnLastName DoeAge 42

Company ContosoRegions EU

USLA

External communication

Pub/Sub & Http activities

Http activities

25

➔ No ‘HttpReceive’ activities➔ Use REST api ➔ or Pub/Sub activities➔ or WorkflowClient

➔ Support for security tokens, REST services …

Pub/Sub activities

26

➔ Leveraging Service Bus Topics & SubscriptionsActivities➔ BuildMatchAllFilter activity > define filter➔ Subscribe activity > create SB subscription behind

the scenes➔ ReceiveNotification

➔ With Filter > temporary subscription, deleted after 1st message➔ Using SubscriptionHandle > subscription remains existing

➔ Unsubscribe (implicitly when subscriptionhandle out of scope)

Conclusions BPMN support announced at BTS

summit

SharePoint is biggest customer of Workflow Manager

Workflow manager is multi-tenant – cloud-ready platform

Look out for upcoming BPM features by the WABS team

Thank you!

Keep in touch. Call or mail us. Ask questions. Happy to help.

LinkedInblog.codit.eu codit.eu

NewsletterTwitter

Pay us a visit