Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Case Study: Revolutionizing Microsoft Axapta Mike Ehrenberg COML01 Architect, Microsoft Business Solutions Microsoft Corporation."— Presentation transcript:

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

2 2 Applying PDC2005 Technology Extending your application with technologies featured at PDC2005 Enable workflow to better model how work is really done Expose business logic as web services for better integration Share the application model to simplify reporting Exposing application content as web parts for better visibility Case study based on Microsoft Axapta

3 3 COM interfaces to business logic What Is Microsoft Axapta? Fastest growing Microsoft ERP Integrating technology for easier extensibility Web service interfaces to business logic SharePoint based Enterprise Portal SQL Server Reporting Services (SRS) Reporting Microsoft Dynamics AX 4.0 Axapta Enterprise Portal Axapta Reporting Services Reporting Services Axapta 3.0 Version 4.0 (beta 2005) NEW

4 4 Why Enable Workflow? Workflow connects work done by people with work done in software Enabling workflow provides More user guidance Broader visibility Flexibility The ability to measure efficiency What we’ll cover today Identifying great workflow scenarios Integrating Windows Workflow Foundation (WWF) Adapting your application for WWF Adding WWF tracking providers Business Process Software People Let’s look at a real world scenario: adding new vendors

5 5 Add Vendor Scenario Typical application view starts and ends with Add Vendor transaction The workflow: Coordinates work performed by people and by software Is long running and stateful Is transparent and dynamic through its lifecycle What really happens (a simple view) 1.Vendor clicks “Contact Us” from web site and requests to be added as a supplier 2.Information is provided by phone or fax 3.Purchasing user needs to check if vendor is already “in the system” 4.Vendor provides compliance information 5.Purchasing manager approves addition of new vendor 6.Vendor added to the system through Add Vendor

6 6 Adding New Vendors with Microsoft Dynamics AX and WWF Mike Ehrenberg COML01 Architect, Microsoft Business Solutions Microsoft Corporation

7 7 The Big Picture WWF is hostable – options include IIS, a dedicated host, or your application We’ve chosen IIS here and created Web service interfaces for the Workflow This lets us correlate with the long running task from multiple points The Web service interface to our Workflow simplifies activation Windows Workflow Foundation (WWF) Add Vendor Workflow Activity Host Process (IIS) Web Service I/F Dynamics AX Web Service I/F Vendor VendorCandidate Windows SharePoint Services (WSS) SQL Server Reporting Services Windows Communications Foundation (WCF) (WCF)

8 8 Putting It All Together Windows Workflow Foundation (WWF) Add Vendor Workflow Activity Host Process (IIS) Web Service I/F Dynamics AX Web Service I/F Vendor VendorCandidate Windows Communications Foundation (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 candidate Raise certification info received event Raise approval received event Call Dynamics via web service to save new Vendor WAIT WAIT

9 9 Making It Happen  Find great workflow scenarios  Prepare your application for workflow  Define the WWF workflow  Activate the WWF workflow  Design for measurement with WWF tracking providers

10 10 Step 1 – Find Great Scenarios Look for places where the work that people do spans multiple steps they perform in the software (long-running and stateful) Look for places where users are confused about “what should happen next” Look for places where process compliance is important Look for places where the business needs visibility and measurement between steps that are today principally performed by people

11 11 Step 2 – Prepare The Application Provide Web service interfaces to business logic Raise events around relevant status changes Consider securing access to steps managed only through workflow Consider adding document state for approval workflows Consistent read/create operations for all exposed document types Also expose other important operations, eg. Post Invoice, etc.

12 12 Step 3 – Define the WWF Flow WWF Designer in Visual Studio Workflow composed as set of Activities Since Dynamics AX actions are exposed as Web services, they can be incorporated directly in the WWF flow using the standard “Call Web service Activity” 1.Receive new vendor request 2.Check for a duplicate in Dynamics 3.Wait for ownership certification 4.Submit for approval 5.Create new vendor in Dynamics

13 13 Step 4 – Activate The WWF Flow Consider exposing the WWF workflow as a web service – allows the initiating request to automatically initiate the workflow instance [WebMethod] public void CreateVendorCandidate(PayableTypes.VendorCandidateService.VendorCandidate vendorCandidate) { WorkflowRuntime workflowRuntime = new WorkflowRuntime("WorkflowRuntime"); WorkflowRuntime workflowRuntime = new WorkflowRuntime("WorkflowRuntime"); workflowRuntime.StartRuntime(); workflowRuntime.StartRuntime(); WorkflowInstance instance = workflowRuntime.StartWorkflow WorkflowInstance instance = workflowRuntime.StartWorkflow (typeof(PayableWorkflows.VendorCreationManagement)); VendorCandidateArgs eventArgs = new VendorCandidateArgs(instance.InstanceId, vendorCandidate.VendCandidate[0].properties.DunBradstreet, vendorCandidate); VendorCandidateArgs eventArgs = new VendorCandidateArgs(instance.InstanceId, vendorCandidate.VendCandidate[0].properties.DunBradstreet, vendorCandidate); eventArgs.VendorCandidate.VendCandidate[0].properties.WorkflowInstanceId = instance.InstanceId.ToString(); eventArgs.VendorCandidate.VendCandidate[0].properties.WorkflowInstanceId = instance.InstanceId.ToString(); EventProxy eventProxy = new EventProxy(instance.InstanceId, typeof(IVendorCreationManagement), workflowRuntime); EventProxy eventProxy = new EventProxy(instance.InstanceId, typeof(IVendorCreationManagement), workflowRuntime); eventProxy.RaiseEvent("VendorCandidateReceived", new object[] { null, eventArgs }, null, null, null); eventProxy.RaiseEvent("VendorCandidateReceived", new object[] { null, eventArgs }, null, null, null); workflowRuntime.StopRuntime(); workflowRuntime.StopRuntime(); workflowRuntime.Dispose(); workflowRuntime.Dispose();} 1 Activate the WWF runtime Tell it to start a VendorCreationManagment workflow instance 2 3 Raise an event to the instance passing in the incoming document 4 Clean up runtime – really should have an HTTP module to manage one instance of WWF runtime per app domain

14 14 Step 5 – Workflow Insight Questions your users want to answer: How long is it taking to approve a vendor? How many requests are backlogged for each purchasing manager? How often do suppliers not even know we have a relationship? How many requests am I rejecting? By bringing the entire process into the software model, we have the opportunity to help answer these questions…and WWF Tracking is how we do that

15 15 What is WWF Tracking? Use Tracking to record data about WWF instances as they execute Current status of the long running process Time spent across parts of/the whole process Exception paths taken, Etc. A default tracking service is provided…or supply your own Consider where you want the tracking data stored We have elected to store the tracking information as Dynamics AX application data so that we can report across process and business data together Exposed a service interface from Dynamics AX to save the tracking data Tracking is called by WWF with every Activity state change Consider performance impacts of tracking when WWF is sequencing system activities – less of a challenge when user activities are involved TRACK TRACK

16 16 Implementing the Tracking Provider namespace CustomTrackingService {... #region Channel #region Channel /// Receives tracking events for an instance. /// Receives tracking events for an instance. private 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; } /// Write selected tracking events to log /// Write selected tracking events to log public override void Send( TrackingRecord record ) public override void Send( TrackingRecord record ) { ActivityTrackingRecord activity = record as ActivityTrackingRecord; ActivityTrackingRecord activity = record as ActivityTrackingRecord; if ((activity.QualifiedId == "VendCandRcvd") && (activity.Status == Status.Executing)) if ((activity.QualifiedId == "VendCandRcvd") && (activity.Status == Status.Executing)) {...... }...

17 17 Reporting Visibility Tracking information on WWF instances stored together with business application data Easy to find… neatly tucked in among the application’s 2000 other tables! Not a tracking issue – just a reflection of the complexity of reporting against large databases Simplifying visibility Names that are relevant to the user What tables are important for reporting? What groups of tables reflect related areas of the application? How are tables related? SQL Server 2005 SQL Reporting Services (SRS) introduces the ability to provide a semantic model for reporting…use it to deliver a simpler lens on the data

18 18 Reporting Visibility Microsoft Dynamics AX builds the new semantic models dynamically from enhanced application metadata Tables grouped by domain and sub-domain Separate models for separate reporting areas User-relevant names Importance to reporting of tables and columns SQL Server 2005 Database 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 Builder Visual Studio Report Designer Designers for simple or complex reports using the new models

19 19 SQL Server Reporting Services Report Builder Mike Ehrenberg COML01 Architect, Microsoft Business Solutions Microsoft Corporation

20 20 Call to Action Enable workflow in your applications Identify scenarios that connect work performed by people and software Expose the application as WCF Web services Choose the right WWF hosting strategy Implement Tracking to deliver workflow insight Provide workflow visibility through Windows SharePoint Services and SQL Server Reporting Services Simplify the report designers access to information through SMDL markup from your application

21 21 Community Resources At PDC For more information, go see COM210 Introduction to Workflow in Windows Applications COM328 Extending Workflow Capabilities With Custom Activities COM318 Developing Rules-Driven Workflows OFF415 Windows SharePoint Services: Developing Custom Workflows COM322 Developing Event-Driven State Machine Workflows COM325 Workflow + Messaging + Services - Developing Dist’d Apps COM327 Hosting and Communications in Workflow Scenarios “Ask The Experts” tables and COM Track Lounge Get your copy of the “Introducing Windows Workflow Foundation” book After PDC If you missed this related session, watch it on the DVD COML01: Revolutionizing Microsoft Axapta MSDN dev center: http://msdn.microsoft.com/workflow http://msdn.microsoft.com/workflow Windows Workflow Foundation Community site: http://www.windowsworkflow.net http://www.windowsworkflow.net Channel 9 tag: http://channel9.msdn.com/tags/workflow http://channel9.msdn.com/tags/workflow

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


Download ppt "Case Study: Revolutionizing Microsoft Axapta Mike Ehrenberg COML01 Architect, Microsoft Business Solutions Microsoft Corporation."

Similar presentations


Ads by Google