You are on page 1of 59

Dynamics AX - Workflow

Czeslawa Langowska czlangow@microsoft.com Support Specialist

Agenda
Dynamics AX workflow functional
How does it look like? Which workflows are standard? How do you configure those?

Workflow from a technical point of view


How do develop a workflow in Ax2009 How is Workflow orchestrated in AX 2009 with windows workflow foundation

Tips and tricks around Dynamics AX and integrated technologies Q&A

AX2009 WORKFLOW FUNCTIONAL


ANOUK THOMAS

DEMO EXPENSE MANAGEMENT

Purchase Requisition

Out-of-the-Box Workflow Templates


General Ledger
General journal, ledger allocations, fixed assets, fixed assets budget

Accounts Receivables
Payment journal, draw bill of exchange journal, protest bill of exchange journal, redraw bill of exchange journal, remittance journal, settle bill of exchange journal

Accounts Payables
Invoice register, invoice approval journal, invoice journal, payment journal, draw promissory note journal, redraw promissory note journal, remittance journal, settle promissory note journal

Trade and Source


Purchase requisition approval

Project Accounting
Project purchase requisition approval

Expense Management
Cash advance request template, expense template, non-project line item workflow template, project expense line workflow template

Workflow Overview
Workflow Started

Configuration

Runtime

Workflow

Workflow Instance

Workflow Task
Workflow Step

Workflow Approval
Ken

Workflow Step

Design
Workflow Task

Workflow Step

Workflow Template Workflow Completed

Isaac

Michael

WORKFLOW CONFIGURATION

10

11

12

13

14

15

16

17

18

19

20

Summary
Fully embedded in the system Out-of-the-box templates Easy to configure, to customize Delegate options Safe limits
1 person approves Multiple people approve Majority or percentage of people approve 1st line manager

Approval based on role, hierarchy or user Escalation Multiple languages Version management

AX2009 WORKFLOW TECHNICAL


CZESLAWA LANGOWSKA

DAX 2009 Workflow architecture

Workflow topology
Workflow infrastructure consists of:
Workflow runtime for Internet Information Services (IIS) Workflow runtime for Application Object Server (AOS)

Workflow can be installed on the same IIS server (farm) along with Enterprise Portal, Application Integration Framework (AIF) Web services and SQL Reporting Services (although it is recommended to use dedicated IIS) While planning your system topology, you need to estimate the added load that workflow activities will generate on the workflow server and the database If you have two users submitting document to Workflow, two instances are started

How workflow is executed

Installation of DAX 2009 Workflow


Before installing Workflow set up the Workflow system account and Workflow execution account in Administration -> Setup -> Security -> System Service Accounts

Configure Workflow accounts


Workflow system account Provides table access to the Workflow infrastructure. The Workflow Web server (IIS) uses this account to communicate with DAX (AOS). Workflow execution account This account is used for running application business logic and accessing DAX data
The domain account must selected for Workflow system accont \ workflow execution account:
Be a dedicated account Have a password that does not expire Have minimal access to network resources

Running axSetup.exe
axSetup will install:
Internet Information Services (IIS) when is not installed ASP.NET 2.0 Microsoft Dynamics AX .NET Business Connector .NET 3.5 Framework which contains Windows Workflow Foundation

What does axSetup do?


You have to create Web site before you run axSetup otherwise Workflow will be installed on Default Web Site Create a virtual directory MicrosoftDynamicsAXWorkflow50 for Workflow located under selected Web site in IIS. The content of the virtual directory will be located at \Program Files\Microsoft Dynamics AX\50\Workflow Create an application pool MicrosoftDynamicsAXWorkflow50 for the virtual directory. This application pool will run as .NET Business Connector proxy account After installation coplete add Workflow Web site to trusted sites on AOS server to enable AOS server to communicate with Workflow Web Services

Workfolow Infrastucture Configuration wizard


Wizard is available in Administration -> Setup -> Workflow infrastructure wizard Configure Workflow processing batch job (Workflow Message processing class SysWorkflowMessageQueueManager) Configure the Workflow due date batch job (Workflow Due date expiration class WorkflowWorkItemDueDateJob)

Problem with Workflow (1/2)


On Windows 2008 when you run Workflow infrastructure wizard during validation you get error The request failed with HTTP status 401: Unauthorized and in event viewer following error is logged:
Log Name: Application Source: ASP.NET 2.0.50727.0 Event ID: 1314 Level: Information Event message: File authorization failed for the request. Application information: Application domain: /LM/W3SVC/1/ROOT/MicrosoftDynamicsAXWorkflow50-4-128727879546410661 Trust level: Full Application Virtual Path: /MicrosoftDynamicsAXWorkflow50 Application Path: C:\Program Files\Microsoft Dynamics AX\50\Workflow\ Request information: Request URL: http://be-czlangow05/MicrosoftDynamicsAXWorkflow50/AxWorkflowInstance.asmx Request path: /MicrosoftDynamicsAXWorkflow50/AxWorkflowInstance.asmx User: EUROPE\BE-CZLANGOW03$ Is authenticated: True

Problem with Workflow (2/2)


AOS account does not have permission for path \Program Files\Microsoft Dynamics AX\50\Workflow\ To solved this problem is enough to give AOS account (in my case EUROPE\BECZLANGOW03) read permissions for that folder:

How to mantain Workflow


Basic -> Inquiries -> Workflow history we can check every workflow special the one which were Stopped(Error) and verify what was the reason In event viewer there is new node added called Microsoft Dynamics AX Workflow (in Windows 2008 you can find it under Application and Services Logs:

How to mantain Workflow


You can use Tutorial_WorkflowProcessor form in AOT \ Forms node to simulate batch processing for workflow (as well as for testing purposes)

Several instances of Workflow on one IIS server


Common question from partner It is not possible with Dynamics AX 2009 RTM and with SP1, although we are aware of this problem Sustain engineering delivered the hotfix KB960801. Hotfix should be install and in web.config of <appSettings> you will be able to set up Configuration Workflow <add key="BUSINESS_CONNECTOR_CONFIGURATION" value="TestBC"/> which BC.NET should use to connect AOS </appSettings
OR <add key="BUSINESS_CONNECTOR_CONFIGURATION" value="c:/yourconfigfile.axc" />

Troubleshooting workflow
Is there a number sequence for configuration IDs? Basic -> Setup -> Settings for workflow If you use the WorkflowWorkCalendarDueDateProvider, are there valid working times in the system to assign a work item to? Basic -> Common forms -> Calendar Is workflow installed? By default, workflow may not be installed. Is Microsoft Share Point installed? By default, Share Point and other Web programs may use the IIS Default Web Site. Create a new web site URL for workflow on a different port using IIS Manager.

Troubleshooting workflow
Do you have rights to run workflow? A valid security account must be set up. Administration -> Setup -> User groups click on Premissions Viewing: Workflow Do you have a valid workflow URL for the Internet Information Service (IIS)? To validate your workflow URL for IIS, on the Setup pane in the Basic -> Setup -> Setting for workflow click the Administration tab, and then click Validate. Are workflow system accounts set up for workflow? Administration -> Setup -> Security > System service accounts, set an Alias and Network domain for the Workflow System Account and the Workflow Execution Account.

Troubleshooting workflow
Look into Basic -> Inquiries -> Workflow history is there any error mentioned? Look into Microsoft Dynamics AX Workflow event log is there any errors mentioned? Look into Application event log is there any errors mentioned from BC.NET ? Is BC.NET started correctly? If it is you will get Information:
Microsoft Dynamics AX Business Connector Session 10. Dynamics .NET Business Connector has been started. System Information: PID: 5092 Component: C:\Windows\assembly\GAC_64\Microsoft.Dynamics.BusinessConnectorNet\5.0.0.0__31bf 3856ad364e35\Microsoft.Dynamics.BusinessConnectorNet.dll Registration: .Net Build number: 593 Configuration: BCDebug System directory: C:\Program Files (x86)\Microsoft Dynamics AX\50\Client\ Application: Database: AOS: BE-CZLANGOW03 X++ debugging: Enabled

BC.NET does not start


When you run Workflow BC.NET does not start and error is logged:
Session log on for Microsoft Dynamics failed. Dynamics Adapter LogonAs failed. Microsoft.Dynamics.Framework.BusinessConnector.Session .Exceptions.FatalSessionException Microsoft.Dynamics.BusinessConnectorNet.NoIISRightsExc eption

The Enterprise Portal Framework license is required because the DAX workflow runtime ultimately uses the .NET Business Connector

Refereneces
Microsoft Dynamics AX 2009 White Paper: Integration of Workflow Capabilities into Journals http://www.microsoft.com/downloads/details.aspx? FamilyId=92DB8FD7-50D7-495E-BAB8B97144D762B2&displaylang=en - The journals capable of being integrated with workflow approvals must originate in the LedgerJournalTable and be accessible by the LedgerJournalTableForm. Currently only those journals defined in General ledger > Setup > Journals may be integrated with workflow. This white paper identifies the areas where code needs to be added or modified to enable workflow approvals integration for a specific journal type.

Refereneces
Using Microsoft Dynamics Ax 2009 Workflow controls in EP (http://blogs.msdn.com/solutions/archive/2008/07/ 30/using-microsoft-dynamics-ax-2009-workflowcontrols-in-ep.aspx ) Developing a Workflow (How Do I in Microsoft Dynamics AX 2009 SDK) (http://msdn.microsoft.com/enus/library/cc967389.aspx )

AX2009 TIPS & TRICKS INTEGRATED TECHNOLOGIES


CZESLAWA LANGOWSKA

Dynamics AX 2009 Integrated technologies

MS SQL 2008 and DAX 2009 Reporting extensions


DAX 2009 RTM version need hotfix KB957312 which can be downloaded: https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx ?scid=kb$EN-US$957312&wa=wsignin1.0
please note that axSetup should be patched and file Microsoft.Dynamics.Setup.ReportingServices.dll should be copied Kernel and application hotfix should be also installed

DAX 2009 SP1 contains hotfix but also needs to patch file Microsoft.Dynamics.Setup.ReportingServices.dll for axSetup from RTM version please read Microsoft Dynamics AX 2009 SP1 Install Guide.pdf (https://mbs.microsoft.com/downloads/customer/AX/2009s p1/Microsoft_Dynamics_AX_2009_SP1_Install_Guide.pdf )
Then you can install Reporting extensions from RTM axSetup After you will be able to apply SP1 on Reporting extension component

Double hop issue


Error:
An Error has occurred while establishing as connection to the Analysis Server or Reports dont display in the EP website from a Client Browser not local to the IIS server Cannot read information from SQL Server Reporting Services. Validate that the Report Manager URL is correct

When: We have 3 physical machines:


SQL Server with Reporting Services + OLAP service AOS server MOSS 2007 Server Setup Service Principle names (SPN) on each server to allow the passing of Kerberos certificate MSDN blog: Enterprise Portal Kerberos Delegation for connecting to Reporting/Analysis Services on a different box TechNet blog: Understanding Kerberos Double Hop TechNet webcast: How to understand, implement, and troubleshoot Kerberos double-hop authentication KB 917109: How to configure SQL Server 2005 Analysis Services to use Kerberos authentication

Solution:
References:

Why double hop issue?

User

Server 1

Server 2

The problem starts when Server 1 is acting on behalf of the authenticated user. As long as Server 1 would access Server 2 with his own Computer / Service Account we would not have any issue. But sometimes the data returned by a Server needs to be "Security Trimmed" (not every user is allowed to see everything) and this is the case in our scenario. So Server1 needs to authenticate to Server2 again as the User.

Why double hop issue?

User

Server 1

Server 2

Basic authentication sends use credential (User name,


Domain name and password) as clear text so it can be easly passed to Server2 not recomended and Enterprise Portal does not support this NTLM Windows Integrated does not send credential as clear text instead client is sending unique hash with user credential. To verify hash the Domain Controller is involved too, comparing own build hash with hash sent by client. It works fine for Server1, but then Server1 has to build new hash to get authenticated to Server2, but Server1 does not know password so it not authenticated to Server2 - double hop issue

Why double hop issue?

User

Server 1

Server 2

Kerberos introduced with Windows 2000 and requiries Active Directory. Kerberos authentication sends tickets which is issued by Active Directory Domain Controller. So the client (user) is sending Server1 Kerberos ticket. Server1 can reuse the ticket received and pass it to Server2. This concept is called delegation
If you want to know more, the following blog is a good starting point: http://blogs.technet.com/askds/archive/2008/06/13/understanding-kerberos-doublehop.aspx

Set up Kerberos for DAX environment


Microsoft Dynamics AX 2009 White Paper: Configuring Kerberos Authentication with Role Centers: http://www.microsoft.com/downloads/details.aspx? FamilyID=be720eb3-649a-49ff-b019a1e4e7af6b47&DisplayLang=en Microsoft Dynamics AX 2009 White Paper: Configuring Enterprise Portal and Role Centers with SQL Reporting http://www.microsoft.com/downloads/details.aspx? FamilyID=3D2463FC-EA13-40EF-A3752DA2F379652C&displaylang=en

OLAP default cubes are not processing


OLAP Cubes are built assuming a full Demo license key, once different license is applied cubes cannot be proccessed Repairing Default OLAP Cubes White Paper for Microsoft Dynamics AX 2009 (http://www.microsoft.com/downloads/details.aspx?FamilyId=28CDB057416A-497E-A7E0-8D52C4EB1BFB&displaylang=en ) Reducing cubes is a semi-automated process (AX functionality does only part of the work) There is a white paper that should be followed by a customer or a partner when reducing pre-built cubes at a customer site. This is a developer scenario: white paper assumes following skills Understand OLAP concepts Familiarity with SQL server BI development studio (SQL 2005 or SQL 2008) Time needed: 2~4 Hrs Dependent on skill level of the developer/partner Depends on the amount of Licenses reduced from the full configuration

After reducing pre-built cubes, analytics content needs to be reduced (OLAP Reports exposed via role centers or menu items, KPIs )
Time needed: 1~3 Hrs Depends on the amount of Licenses reduced from the full configuration Depends on the number of Role Center pages used

Role center
How can I get information what reports and what KPIs are used on the Role Center? https://www.microsoft.com/dynamics/ax/using/ax_ rolecenterreference.mspx you will find every Role Center detailed described (..\Documents\Pizza sessions\FIM_Accounting_Mgr.doc) In document you can find
The list of used WebParts The list of Reports from SQL Reporting Services (type: chart, report; if it is depended on queue, select criteria) List of KPIs and how they are counted

Problem with deploying DAX 2009 reports


During report deployment you get error:
Microsoft Dynamics AX Reporting Project Deployment: The following components have not been installed or are not configured correctly: AL.exe Microsoft Domain-Specific Language Tools

Rootcause:
Required components are not installed

Solution:
Microsoft Visual Studio 2008 Shell (isolated mode) Redistributable Package NOTE: Install regardless of operating system Step 1 Save the download locally Step 2 Extract the package Step 3 run the vs_appenvredist.msi Windows SDK for Windows Server 2008 and .NET Framework 3.5 NOTE: Install regardless of operating system

Dynamics AX SSRS reports not working


Enterprise Portal (EP) web site runs but not the reports in the EP web parts:
Dynamics Adapter LogonAs failed or Microsoft.Dynamics.BusinessConnectorNet.LogonFaile dException

Rootcouse
Execution account for SQL Reporting Services is setup

Solution:
Leave execution account blank on SSRS 2005 or set it to BC proxy account on SSRS 2008

Dynamics AX SSRS stopped working


When you try to run AX report you get error:
An attempt has been made to use a data extension 'AXDATAMETHOD' that is not registered for this report server. (rsDataExtensionNotFound) or data extension 'AXQUERY' and 'AXADOMD'

Rootcause:
SSRS updates or Service Packs remove entries from rsreportserver.config file

Solution
Reinstall reporting extensions Backup copy of \Program Files\ Microsoft SQL Server \ MSSQL.<Instance>\Reporting Services\ReportServer and restore it after SQL update

Dynamics AX SSRS reports not working


On the report you get error:
Query execution failed for data set Year. Query (9, 4) The dimension [Ledger period trans date] was not found in the cube

Rootcause:
Cubes were not proccessed No data in table LedgerPeriodTimeDimension

Solution:
Check if there is data in table LedgerPeriodTimeDimension if not run job:
static voind PopulateData(Args _args) { ; LedgerPeriodTimeDimension::populate(); }

Proccess cubes

Dynamics AX SSRS reports not working


You get error:
Query execution failed for data set The dimension [Master Company Reporting Currency] was not found in

Rootcause:
Exchange rate from Analysis services was not set up

Solution:
Go to Administration -> Setup -> Business analysis > OLAP -> Setup Exchange Rate and setup exchange rate Proccess cubes

DAX 2009 Enteprise Portal and .NET Framework 3.5 SP1


On your DAX 2009 Enterprise Portal you get error:
A ProgressTemplate must be specified on UpdateProgress control with ID 'AxProgressControl'

Rootcause:
.NET Framework 3.5 SP1 is intalled on EP machine

Solution:
Uninstall .NET Framework 3.5 SP1 and install .NET Framework 3.5 For RTM apply hotfix https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?s cid=kb$EN-US$957312&wa=wsignin1.0 Apply SP1 for DAX 2009 NOTE there is special step needed to install SP1 on DAX 2009 please follow Microsoft Dynamics AX 2009 SP1 Install Guide.pdf (https://mbs.microsoft.com/downloads/customer/AX/2009sp1/ Microsoft_Dynamics_AX_2009_SP1_Install_Guide.pdf )

KPI does not work


You get error on you KPI:
An exception has occurred in data source 'TimeStep'. Details: System.ArgumentException: Field days does not exist.

Rootcause:
Date is sent in other format than en-us so analysis services cannot parse it.

Solution:
Change settings on client IE in Tools -> Internet options -> Languages into EN-US

2006 Microsoft Corporation. All rights reserved.


This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

You might also like