22
Case Study: Case Study: Revolutionizing Revolutionizing Microsoft Axapta Microsoft Axapta Mike Ehrenberg Mike Ehrenberg COML01 COML01 Architect, Microsoft Business Architect, Microsoft Business Solutions Solutions Microsoft Corporation Microsoft Corporation

Case Study: Revolutionizing Microsoft Axapta Mike Ehrenberg COML01 Architect, Microsoft Business Solutions Microsoft Corporation

Embed Size (px)

Citation preview

Case Study: Revolutionizing Case Study: Revolutionizing Microsoft AxaptaMicrosoft Axapta

Mike EhrenbergMike EhrenbergCOML01 COML01 Architect, Microsoft Business SolutionsArchitect, Microsoft Business SolutionsMicrosoft CorporationMicrosoft Corporation

2

Applying PDC2005 Applying PDC2005 TechnologyTechnology

Extending your application with Extending your application with technologies featured at PDC2005technologies featured at PDC2005

Enable workflow to better Enable workflow to better model how work is really donemodel how work is really done

Expose business logic as web Expose business logic as web services for better integrationservices for better integration

Share the application Share the application model to simplify model to simplify reportingreporting

Exposing application content as Exposing application content as web parts for better visibilityweb parts for better visibility

Case study based on Microsoft Case study based on Microsoft Axapta Axapta

3

COM COM interfaces to interfaces to

business logicbusiness logic

What Is Microsoft Axapta?What Is Microsoft Axapta?

Fastest growing Microsoft ERPFastest growing Microsoft ERPIntegrating technology for easier extensibilityIntegrating technology for easier extensibility

Web service Web service interfaces to interfaces to

business logicbusiness logic

SharePoint SharePoint based based

Enterprise Enterprise PortalPortal

SQL Server SQL Server Reporting Reporting

Services (SRS) Services (SRS) ReportingReporting

Microsoft DynamicsMicrosoft DynamicsAXAX 4.04.0

Axapta Axapta Enterprise Enterprise

PortalPortal

AxaptaAxapta Reporting Reporting ServicesServices

Axapta 3.0Axapta 3.0

Version Version 4.0 (beta 4.0 (beta 2005)2005)

NEWNEW

4

Why Enable Workflow?Why Enable Workflow?Workflow connects Workflow connects workwork done done by by peoplepeople with work done in with work done in softwaresoftwareEnabling workflow providesEnabling workflow provides

More user guidanceMore user guidanceBroader visibilityBroader visibilityFlexibilityFlexibilityThe ability to measure efficiencyThe ability to measure efficiency

What we’ll cover todayWhat we’ll cover todayIdentifying great workflow Identifying great workflow scenariosscenariosIntegrating Windows Workflow Integrating Windows Workflow Foundation (WWF) Foundation (WWF) Adapting your application Adapting your application for WWFfor WWFAdding WWF tracking providersAdding WWF tracking providers

Business Business ProcessProcess SoftwareSoftware

PeoplePeople

Let’s look at a real world scenario: adding new vendorsLet’s look at a real world scenario: adding new vendors

5

Add Vendor ScenarioAdd Vendor Scenario

Typical application view starts Typical application view starts and ends with and ends with Add VendorAdd Vendor transactiontransaction

The workflow:The workflow:CoordinatesCoordinates work performed by work performed by peoplepeople andand by by softwaresoftwareIs Is long running and statefullong running and statefulIs Is transparent and dynamictransparent and dynamic through through its lifecycleits lifecycle

What really happens What really happens

(a simple view)(a simple view)1.1. Vendor clicks “Contact Us” Vendor clicks “Contact Us”

from web site and from web site and requests to be added as a requests to be added as a suppliersupplier

2.2. Information is provided by Information is provided by phone or faxphone or fax

3.3. Purchasing user needs to Purchasing user needs to check if vendor is already check if vendor is already “in the system”“in the system”

4.4. Vendor provides Vendor provides compliance informationcompliance information

5.5. Purchasing manager Purchasing manager approves addition of new approves addition of new vendorvendor

6.6. Vendor added to the Vendor added to the system through Add system through Add VendorVendor

6

Adding New Vendors with Adding New Vendors with Microsoft DynamicsMicrosoft DynamicsAXAX and and WWFWWF

Mike EhrenbergMike EhrenbergCOML01 COML01 Architect, Microsoft Business Architect, Microsoft Business SolutionsSolutionsMicrosoft CorporationMicrosoft Corporation

7

The Big PictureThe Big Picture

WWF is hostable – options include IIS, a dedicated host, or your WWF is hostable – options include IIS, a dedicated host, or your applicationapplication

We’ve chosen IIS here and created Web service interfaces for the We’ve chosen IIS here and created Web service interfaces for the WorkflowWorkflowThis lets us correlate with the long running task from multiple pointsThis lets us correlate with the long running task from multiple pointsThe Web service interface to our Workflow simplifies activationThe Web service interface to our Workflow simplifies activation

Windows Windows Workflow Workflow

Foundation Foundation (WWF)(WWF)

Add Add Vendor Vendor

WorkflowWorkflow

ActivitActivityy

Host Process Host Process (IIS)(IIS)

Web

Serv

ice I/F

Web

Serv

ice I/F

DynamicsDynamicsAXAX

Web

Serv

ice I/F

Web

Serv

ice I/F

VendorVendor

VendorVendorCandidatCandidat

ee

Windows Windows SharePoinSharePoint Services t Services

(WSS)(WSS)

SQL SQL Server Server

Reporting Reporting ServicesServices

Win

dow

s

Win

dow

s

Com

mu

nic

atio

ns

Com

mu

nic

atio

ns

Fou

nd

atio

nFou

nd

atio

n (W

CF)

(WC

F)

8

Putting It All TogetherPutting It All Together

Windows Windows Workflow Workflow

Foundation Foundation (WWF)(WWF)

Add Add Vendor Vendor

WorkflowWorkflow

ActivitActivityy

Host Process Host Process (IIS)(IIS)

Web

Serv

ice I/F

Web

Serv

ice I/F

DynamicsDynamicsAXAX

Web

Serv

ice I/F

Web

Serv

ice I/F

VendorVendor

VendorVendorCandidatCandidat

ee

Windows Communications Windows Communications FoundationFoundation

(WCF)(WCF)

Form request from

web calls service

Call Dynamics via web service to check for a duplicate vendor

Call Dynamics via web service to save the vendor candidateRaise certification info received event

Raise approval received event

Call Dynamics via web service to save new Vendor

WAIWAITT

WAIWAITT

9

Making It HappenMaking It Happen

1.1. Find great workflow scenariosFind great workflow scenarios

2.2. Prepare your application for workflowPrepare your application for workflow

3.3. Define the WWF workflowDefine the WWF workflow

4.4. Activate the WWF workflowActivate the WWF workflow

5.5. Design for measurement with WWF Design for measurement with WWF tracking providerstracking providers

10

Step 1 – Find Great Step 1 – Find Great ScenariosScenarios

Look for places where the Look for places where the work that people do spans work that people do spans multiple steps they perform in multiple steps they perform in the software (long-running and the software (long-running and stateful)stateful)Look for places where users Look for places where users are confused about “what are confused about “what should happen next”should happen next”Look for places where process Look for places where process compliance is importantcompliance is importantLook for places where the Look for places where the business needs visibility and business needs visibility and measurement measurement betweenbetween steps steps that are today principally that are today principally performed by peopleperformed by people

Business Business ProcessProcess SoftwareSoftware

PeoplePeople

Business Business ProcessProcess SoftwareSoftware

PeoplePeople

11

Step 2 – Prepare The Step 2 – Prepare The ApplicationApplication

Provide Web service interfaces to business logicProvide Web service interfaces to business logic

Raise events around relevant status changesRaise events around relevant status changes

Consider securing access to steps managed only Consider securing access to steps managed only through workflowthrough workflow

Consider adding document state for approval Consider adding document state for approval workflows workflows

Consistent read/create operations for all exposed Consistent read/create operations for all exposed document typesdocument types

Also expose other important operations, eg. Post Invoice, Also expose other important operations, eg. Post Invoice, etc.etc.

12

Step 3 – Define the WWF Step 3 – Define the WWF FlowFlow

WWF Designer in Visual StudioWWF Designer in Visual Studio

Workflow composed as set of Workflow composed as set of ActivitiesActivities

Since DynamicsSince DynamicsAX AX actions are actions are exposed as Web services, they exposed as Web services, they can be incorporated directly in can be incorporated directly in the WWF flow using the the WWF flow using the standard “Call Web service standard “Call Web service Activity”Activity”

1.1. Receive new vendor requestReceive new vendor request2.2. Check for a duplicate in Check for a duplicate in

DynamicsDynamics3.3. Wait for ownership certificationWait for ownership certification4.4. Submit for approvalSubmit for approval5.5. Create new vendor in DynamicsCreate new vendor in Dynamics

13

Step 4 – Activate The WWF Step 4 – Activate The WWF FlowFlow

Consider exposing the WWF workflow as a web service – Consider exposing the WWF workflow as a web service – allows the initiating request to automatically initiate the allows the initiating request to automatically initiate the workflow instanceworkflow instance

[[WebMethodWebMethod]]publicpublic voidvoid CreateVendorCandidate(PayableTypes.VendorCandidateService.VendorCandidate CreateVendorCandidate(PayableTypes.VendorCandidateService.VendorCandidate vendorCandidate)vendorCandidate){{ WorkflowRuntimeWorkflowRuntime workflowRuntime = workflowRuntime = newnew WorkflowRuntimeWorkflowRuntime(("WorkflowRuntime""WorkflowRuntime");); workflowRuntime.StartRuntime();workflowRuntime.StartRuntime(); WorkflowInstanceWorkflowInstance instance = workflowRuntime.StartWorkflowinstance = workflowRuntime.StartWorkflow

((typeoftypeof(PayableWorkflows.(PayableWorkflows.VendorCreationManagementVendorCreationManagement));));

VendorCandidateArgsVendorCandidateArgs eventArgs = eventArgs = new new VendorCandidateArgsVendorCandidateArgs(instance.InstanceId, (instance.InstanceId, vendorCandidate.VendCandidate[0].properties.DunBradstreet, vendorCandidate.VendCandidate[0].properties.DunBradstreet, vendorCandidate);vendorCandidate); eventArgs.VendorCandidate.VendCandidate[0].properties.WorkflowInstanceId = eventArgs.VendorCandidate.VendCandidate[0].properties.WorkflowInstanceId =

instance.InstanceId.ToString();instance.InstanceId.ToString(); EventProxyEventProxy eventProxy =eventProxy = newnew EventProxyEventProxy(instance.InstanceId,(instance.InstanceId, typeoftypeof((IVendorCreationManagementIVendorCreationManagement), workflowRuntime);), workflowRuntime); eventProxy.RaiseEvent(eventProxy.RaiseEvent("VendorCandidateReceived""VendorCandidateReceived",, newnew objectobject[] { [] { nullnull, , eventArgs },eventArgs }, nullnull,, nullnull,, nullnull););

workflowRuntime.StopRuntime();workflowRuntime.StopRuntime(); workflowRuntime.Dispose();workflowRuntime.Dispose();}}

11 Activate the WWF runtime

Tell it to start a VendorCreationManagment workflow instance

22

33 Raise an event to the instance passing in the incoming document

44 Clean up runtime – really should have an HTTP module to manage one instance of WWF runtime per app domain

14

Step 5 – Workflow InsightStep 5 – Workflow Insight

Questions your users want to answer: Questions your users want to answer: How long is it taking to approve a How long is it taking to approve a vendor?vendor?

How many requests are backlogged for How many requests are backlogged for each purchasing manager?each purchasing manager?

How often do suppliers not even know How often do suppliers not even know we have a relationship?we have a relationship?

How many requests am I rejecting?How many requests am I rejecting?

By bringing the entire process into By bringing the entire process into the software model, we have the the software model, we have the opportunity to help answer these opportunity to help answer these questions…and WWF Tracking is how questions…and WWF Tracking is how we do that we do that

15

What is WWF Tracking?What is WWF Tracking?

Use Tracking to record data about WWF instances Use Tracking to record data about WWF instances as as they executethey execute

Current status of the long running processCurrent status of the long running processTime spent across parts of/the whole processTime spent across parts of/the whole processException paths taken, Etc.Exception paths taken, Etc.A default tracking service is A default tracking service is

provided…or supply your ownprovided…or supply your ownConsider where you want the tracking data Consider where you want the tracking data storedstoredWe have elected to store the tracking We have elected to store the tracking information as Dynamicsinformation as DynamicsAXAX application data application data so so that we can report across process and business that we can report across process and business data togetherdata togetherExposed a service interface from DynamicsExposed a service interface from DynamicsAXAX to to save the tracking datasave the tracking dataTracking is called by WWF with every Activity Tracking is called by WWF with every Activity state change state change Consider performance impacts of tracking when Consider performance impacts of tracking when WWF is sequencing system activities – less of a WWF is sequencing system activities – less of a challenge when user activities are involvedchallenge when user activities are involved

TRACKTRACK

TRACKTRACK

16

Implementing the Tracking Implementing the Tracking ProviderProvidernamespace CustomTrackingServicenamespace CustomTrackingService{{

. . .. . . #region Channel#region Channel /// <summary> Receives tracking events for an instance. </summary>/// <summary> Receives tracking events for an instance. </summary>

private class VendCandTrackingChannel : TrackingChannelprivate class VendCandTrackingChannel : TrackingChannel {{ private TrackingParameters _parameters = null;private TrackingParameters _parameters = null; protected VendCandTrackingChannel()protected VendCandTrackingChannel() {{ }} public VendCandTrackingChannel(TrackingParameters parameters)public VendCandTrackingChannel(TrackingParameters parameters) {{ _parameters = parameters;_parameters = parameters; }} /// <summary> Write selected tracking events to log </summary>/// <summary> Write selected tracking events to log </summary>

public override void Send( TrackingRecord record )public override void Send( TrackingRecord record ) {{ ActivityTrackingRecord activity = record as ActivityTrackingRecord activity = record as

ActivityTrackingRecord;ActivityTrackingRecord;

if ((activity.QualifiedId == "VendCandRcvd") && if ((activity.QualifiedId == "VendCandRcvd") && (activity.Status == Status.Executing))(activity.Status == Status.Executing))

{{ . . .. . .

}}. . .. . .

17

Reporting VisibilityReporting Visibility

Tracking information on WWF instances stored Tracking information on WWF instances stored together with business application datatogether with business application data

Easy to find… neatly tucked in among the application’s Easy to find… neatly tucked in among the application’s 2000 other tables!2000 other tables!

Not a tracking issue – just a reflection of the complexity of Not a tracking issue – just a reflection of the complexity of reporting against large databasesreporting against large databases

Simplifying visibilitySimplifying visibilityNames that are relevant to the userNames that are relevant to the user

What tables are important for reporting?What tables are important for reporting?

What groups of tables reflect related areas of the What groups of tables reflect related areas of the application?application?

How are tables related? How are tables related?

SQL Server 2005 SQL Reporting Services (SRS) SQL Server 2005 SQL Reporting Services (SRS) introduces the ability to provide a semantic model introduces the ability to provide a semantic model for reporting…use it to deliver a simpler lens on for reporting…use it to deliver a simpler lens on the datathe data

18

Reporting VisibilityReporting Visibility

Microsoft DynamicsMicrosoft DynamicsAX AX builds the new semantic models builds the new semantic models dynamically from enhanced application metadatadynamically from enhanced application metadata

Tables grouped by domain and sub-domainTables grouped by domain and sub-domain

Separate models for separate reporting areasSeparate models for separate reporting areas

User-relevant namesUser-relevant names

Importance to reporting of tables and columnsImportance to reporting of tables and columns

SQL Server SQL Server 2005 2005

DatabaseDatabase

Application database with full set of tables, native column and table names

Semantic models, defined in mark-up (SMDL) that describe an enhanced view, focused on reporting, of a subset of the database

SRS Report BuilderSRS Report Builder

Visual Studio Visual Studio Report DesignerReport Designer

Designers for simple or complex reports using the new models

19

SQL Server Reporting SQL Server Reporting Services Services Report BuilderReport Builder

Mike EhrenbergMike EhrenbergCOML01 COML01 Architect, Microsoft Business Architect, Microsoft Business SolutionsSolutionsMicrosoft CorporationMicrosoft Corporation

20

Call to Action Call to Action

Enable workflow in your applicationsEnable workflow in your applicationsIdentify scenarios that connect work Identify scenarios that connect work performed by people and softwareperformed by people and softwareExpose the application as WCF Web Expose the application as WCF Web servicesservicesChoose the right WWF hosting strategyChoose the right WWF hosting strategyImplement Tracking to deliver workflow Implement Tracking to deliver workflow insightinsight

Provide workflow visibility through Provide workflow visibility through Windows SharePoint Services and Windows SharePoint Services and SQL Server Reporting ServicesSQL Server Reporting Services

Simplify the report designers access to Simplify the report designers access to information through SMDL markup from information through SMDL markup from your applicationyour application

21

Community ResourcesCommunity ResourcesAt PDCAt PDC

For more information, go seeFor more information, go seeCOM210 Introduction to Workflow in Windows Applications COM210 Introduction to Workflow in Windows Applications COM328 Extending Workflow Capabilities With Custom ActivitiesCOM328 Extending Workflow Capabilities With Custom ActivitiesCOM318 Developing Rules-Driven Workflows COM318 Developing Rules-Driven Workflows OFF415 Windows SharePoint Services: Developing Custom OFF415 Windows SharePoint Services: Developing Custom WorkflowsWorkflowsCOM322 Developing Event-Driven State Machine Workflows COM322 Developing Event-Driven State Machine Workflows COM325 Workflow + Messaging + Services - Developing Dist’d COM325 Workflow + Messaging + Services - Developing Dist’d Apps Apps COM327 Hosting and Communications in Workflow Scenarios COM327 Hosting and Communications in Workflow Scenarios ““Ask The Experts” tables and COM Track LoungeAsk The Experts” tables and COM Track LoungeGet your copy of the “Introducing Windows Workflow Get your copy of the “Introducing Windows Workflow Foundation” bookFoundation” book

After PDCAfter PDCIf you missed this related session, watch it on the DVDIf you missed this related session, watch it on the DVD

COML01: Revolutionizing Microsoft Axapta COML01: Revolutionizing Microsoft Axapta MSDN dev center: MSDN dev center: http://msdn.microsoft.com/workflowhttp://msdn.microsoft.com/workflowWindows Workflow Foundation Community site: Windows Workflow Foundation Community site: http://www.windowsworkflow.nethttp://www.windowsworkflow.net Channel 9 tag: Channel 9 tag: http://channel9.msdn.com/tags/workflowhttp://channel9.msdn.com/tags/workflow

© 2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.