Workflow Manager - a technical overview (Sam Vanhoutte)

28
Workflow Manager Running durable workflows in the cloud and on prem

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)

Page 1: Workflow Manager - a technical overview (Sam Vanhoutte)

Workflow ManagerRunning durable workflows in the cloud and on prem

Page 2: Workflow Manager - a technical overview (Sam Vanhoutte)

Nice to meet youSam VANHOUTTECTO

BizTalk V-TSPIntegration MVP

[email protected]+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

Page 3: Workflow Manager - a technical overview (Sam Vanhoutte)

Agenda• Microsoft & Workflow – a long

history• Workflow designer, activities• AppFabric Workflow Services

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

• Conclusions

Page 4: Workflow Manager - a technical overview (Sam Vanhoutte)

Microsoft & Workflow

A bit of history

Page 5: Workflow Manager - a technical overview (Sam Vanhoutte)

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?

Page 6: Workflow Manager - a technical overview (Sam Vanhoutte)

The ART of Workflow*

* Copyright : Dave Cliffe : Program Manager Workflow

➔ Declarative authoring of programs that coordinate work, using:

➔ Activities➔ Runtime➔ Tooling

Page 7: Workflow Manager - a technical overview (Sam Vanhoutte)

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

Page 8: Workflow Manager - a technical overview (Sam Vanhoutte)

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

Page 9: Workflow Manager - a technical overview (Sam Vanhoutte)

9

DemoAppFabric Workflows & BizTalk

AppFabric WF

BizTalk orch.Senti

net Get

Create

Page 10: Workflow Manager - a technical overview (Sam Vanhoutte)

Workflow ManagerAn overview

Page 11: Workflow Manager - a technical overview (Sam Vanhoutte)

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

Page 12: Workflow Manager - a technical overview (Sam Vanhoutte)

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

Page 13: Workflow Manager - a technical overview (Sam Vanhoutte)

Architecture

Page 14: Workflow Manager - a technical overview (Sam Vanhoutte)

14

Deployment diagram

Page 15: Workflow Manager - a technical overview (Sam Vanhoutte)

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

Page 16: Workflow Manager - a technical overview (Sam Vanhoutte)

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!)

Page 17: Workflow Manager - a technical overview (Sam Vanhoutte)

Testing & Debugging

Page 18: Workflow Manager - a technical overview (Sam Vanhoutte)

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

Page 19: Workflow Manager - a technical overview (Sam Vanhoutte)

Multi-tenancy Through scopes & isolation

Page 20: Workflow Manager - a technical overview (Sam Vanhoutte)

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

Page 21: Workflow Manager - a technical overview (Sam Vanhoutte)

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

Page 22: Workflow Manager - a technical overview (Sam Vanhoutte)

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

Page 23: Workflow Manager - a technical overview (Sam Vanhoutte)

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

Page 24: Workflow Manager - a technical overview (Sam Vanhoutte)

External communication

Pub/Sub & Http activities

Page 25: Workflow Manager - a technical overview (Sam Vanhoutte)

Http activities

25

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

➔ Support for security tokens, REST services …

Page 26: Workflow Manager - a technical overview (Sam Vanhoutte)

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)

Page 27: Workflow Manager - a technical overview (Sam Vanhoutte)

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

Page 28: Workflow Manager - a technical overview (Sam Vanhoutte)

Thank you!

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

LinkedInblog.codit.eu codit.eu

NewsletterTwitter

Pay us a visit