Workflow prerequisites
Before we begin installing and setting up Workflow, you will need to have administrator privileges on the machines in which you are installing Workflow on. The following prerequisites are required:- Internet Information Services (IIS) 7
- .NET Framework 2.0
- Business Connector
Workflow accounts setup
The Workflow system in Dynamics AX utilizes two accounts to function properly. If these accounts are not specified, workflow will still function; however, it is best practice to have dedicated accounts. One account is the service account. This account is responsible for the communication between Dynamics AX and the Workflow web service. The other account is the execution account. This account is responsible for executing Workflow tasks and processes. Similar to the Business Connector proxy account, these two accounts must be created with the following criteria:- The password must never expire
- It must not be interactive
- It must not be associated to any Dynamics AX users
- Log in to Dynamics AX 2009.
- Go to Administration | Setup | Security | System service accounts.
- In the System service accounts form, specify the Workflow System Account and the Workflow Execution Account. To specify the accounts that were created in the Active Directory, mark theAlias field radio boxes. When complete, click on the OK button.
Now that the Workflow accounts have been specified, the Dynamics AX Workflow system can utilize these accounts when communicating with the Workflow web service. It is also possible to create a user within Dynamics AX but not Active Directory, and use the Dynamics AX user accounts as the Workflow Service and Execution accounts. These accounts may appear as different users in Dynamics AX; however, these accounts will be impersonated by the AOS service account to the Workflow web service. This can make troubleshooting and connection auditing more difficult and therefore, it is not recommended.
Installing Workflow
Since Workflow consists of various parts that function together to create the Dynamics AX 2009 Workflow system, we will break down each part’s setup and complete each setup individually.Creating a website for Workflow
Before we can install the Workflow extended server component, we must have a website available to install upon. It is possible to use the default website that is on port 80. However, it is not recommended; therefore, a new website must be created. For information regarding how to create a website in IIS 7, refer tohttp://technet.microsoft.com/en-us/library/cc772350(WS.10).aspx.Installing the Workflow component
By now you should be accustomed to the process of installing the extended components for Dynamics AX. Installing Workflow is no different. The following steps will guide you through the process:- Run the Microsoft Dynamics AX Setup wizard to add new components. In the Add or modify components screen of the wizard, mark the Workflow checkbox, as shown in the following screenshot and then click on the Next button:
- In the following screen of the wizard, specify the password for the .NET Business Connector proxy account, and then click on the Next button:
- In the next section of the wizard, you will be prompted to tweak the Workflow service. In other words, you can select which website you want to install the Workflow service into. By default, the wizard will select the default website in IIS. However, it is recommended to install Workflow on its own dedicated site and port, you have the flexibility to do so. When you are satisfied with the settings on this page, click on the Next button.
- In the following screen you will be prompted to specify the AOS account for the Workflow service to grant permissions to. If there is more than one AOS and each AOS service account is different, provide the accounts for each AOS so that they can access the Workflow service.
- In the following step, you are prompted to complete the installation of the Workflow by clicking on the Finish button. You will want to restart IIS after the Workflow has been successfully installed. Therefore, leave the option checked at the bottom, as shown in the following screenshot:
- Once installed, you will be prompted with the final screen. The final screen will display the result of the installation of the Dynamics AX 2009 Workflow system. If the installation is successful, you will see a green box next to the installed component. Otherwise, if the box is orange or red, you should open the log file after you close the wizard by marking the checkbox at the bottom.
The Domain\user name field will automatically be populated if the Business Connector proxy user is specified in the Administration | Setup | Security | System service accounts form in the Business Connector Proxy group.
Enabling Workflow in Windows Server 2008 R2
In Windows Server 2008 R2, additional setup is required to enable the Workflow web service. The Workflow web service application pool must be enabled to run 32-bit applications. Otherwise, the Workflow service will fail. To set up the application pool to run 32-bit applications, perform the following steps:- Go to the IIS console and access the web server that you installed the Workflow web service on.
- Under <Your web server> | Application Pools, select the Dynamics AX Workflowapplication pool.
- Under Actions, go to Advanced Settings.... In the Advanced Settings window, set the Enable 32-Bit Applications property to True. When complete, click on the OK button to save the changes.
Setting up Workflow
Now that the Workflow service for Dynamics AX has been successfully installed, we can begin to configure it for use. Dynamics AX will not utilize the Workflow service after it has been installed. Therefore, in order to properly configure the Workflow system, we must do so within Dynamics AX 2009.Workflow configuration prerequisites
Before we begin configuring the Workflow system, we need to ensure that the following is set:- A dedicated Workflow batch group has been created
- An AOS is set up as a batch server
Creating a dedicated Workflow batch group
The following steps cover the process of verifying whether an AOS is a batch server and how to create a Workflow batch group:- To create a dedicated Workflow batch group, go to Administration | Setup | Batch groups.
- Create two new records in the Batch group form—one group that will execute Workflow commands and another that will process Workflow due date notifications.
Setting up the AOS as a batch server
Since Dynamics AX workflow uses a batch job to send workflow tasks to the web service in order to be processed in Dynamics AX, we need to ensure that there is at least one AOS that is designated as a batch server. Without the batch job, the Workflow web service would sit idle, waiting for a workflow request even though a user may have initiated a workflow task in Dynamics AX. In this section, we will cover the process of setting up an AOS as a batch server and ensuring that a Workflow’s batch group will be associated to a designated batch server.- To view and modify the current batch server set up on an AOS or group of AOSs, go toAdministration | Setup | Server Configuration.
- Select the appropriate AOS that should run as the batch server and then click on the General tab and ensure that the Is Batch Server checkbox is marked.
- Go to the Batch server groups tab, and add the Workflow batch groups that we created.
- To specify the number of batch threads/processes that can run simultaneously and the time the batch processes can run, go to the Batch server schedule tab and provide the desired values. The following batch schedule is the default schedule and runs eight threads at any time of the day:
An AOS can be set up as a batch server and service users. However, depending on the performance and resource requirements for an implementation, it is recommended to have an AOS as a dedicated batch server.
Configuring Workflow
Now that we have an AOS that can run Workflows in a batch server, we must configure the batch processes. This section will guide you through the process of:- Configuring Dynamics AX to use the Workflow service
- Specifying Workflow parameters for notifications and general use
Running the Workflow infrastructure configuration wizard
The Workflow infrastructure configuration wizard allows you to quickly specify the Workflow web service address, Workflow batch groups, and specify when the Workflow batch jobs should run. It also validates the Workflow web service and ensures that it is accessible by the AOS. In this section, we will cover the process of running the wizard.- Go to the Administration module and in the Setup section, open the Workflow infrastructure configuration wizard. Once in the Workflow infrastructure configuration wizard form, click on the Next button, as shown in the following screenshot:
- In the next section of the wizard, you may specify the URL of the Workflow web service, which you created as described in Creating a website for Workflow section of this article. By default, this field will already be populated if you installed the Workflow service correctly. However, if you want to modify this field, you certainly have the option to do so. Be sure to click on the Validate button to confirm that the URL is accessible by Dynamics AX, as shown in the following screenshot:
- In the following section of the wizard, you will be able to see which batch group is designated to execute Workflow batch jobs. Verify that the appropriate batch group is assigned and then click on the Next button.
- In this section of the wizard, you can specify how many times you want the batch server to repeat the Workflow batch process. The lowest value you can enter is 1. The wizard will allow you to enter in 0; however, the batch system only accepts 1 as the lowest value. Once you have specified the appropriate value, click on the Next button.
- The next and final screen of the wizard displays a summary of all the settings that were specified. Click on the Finish button to apply these new settings and to make Dynamics AX start using the Workflow service.
Specifying Workflow settings
The Workflow infrastructure configuration wizard assists in setting up common Workflow settings that are shared between companies. However, company specific settings for Workflow must also be specified such as Number sequences. Additional settings can be customized but are not required, such as specifying custom e-mail templates or another Workflow web service URL. In this section, we will cover the process of specifying company-specific workflow settings.- Go to Basic | Setup | Settings for workflow. In the General tab, provide a custom template forApproval and task notifications. By default, no template is specified. In this case, a generic e-mail template will be used.
- In the Administration tab, verify that the correct Workflow web service is listed and verify that the system can access the service by clicking on the Validate button.
- In the Number sequences tab, ensure that Number sequences are mapped to the appropriateReference.
If number sequences are not mapped, it may be because the number sequence wizard never ran. To run the number sequence wizard, go to Basic | Setup | Number sequences to load the Number sequences form. In the Number sequences form, run the wizard by clicking on the Wizard button. Dynamics AX will automatically check which number sequences need to be set up and associate number sequences to their reference.
Tuesday, April 3, 2012
How to install and configure Microsoft Dynamics Ax 2009 workflow step by step
NOTE: There is NO warranty on this article, use at your own risk.
I have created a new website called AxWfl as shown above. It’s not mandatory to create a separate website for this but recommended.
This article explains:
How to install Microsoft Dynamics AX 2009 Workflow step by step
How to configure Microsoft Dynamics AX 2009 Workflow step by step
How to setup Microsoft Dynamics AX 2009 Workflow step by step
About Workflow:
The Microsoft Dynamics AX workflow infrastructure enables user configurable workflows in Microsoft Dynamics AX application modules with specific focus on task and approval workflows. The workflow runtime manages configuration and executation of workflows while the application modules will manage activation and business logic associated with workflows.Microsoft Dynamics AX 2009 workflow uses Windows Workflow Foundation (.Net framework), AX batch framework, Internet Information Services (IIS), Active Directory (AD) users, .Net Business Connector for AX and web services.
Prerequisite:
You should have basic knowledge of AX.Basic AX should be installed on your system.Create two users in AD. One is for workflow another is for business connector proxy. The password should not be expired or changed for these users.If you have already created, no need to create now.Add these users to AX.
Steps to follow:
1) Open AX client then open the System service accounts form and add users for workflow.Go to Administrator > Setup > Security > System service accounts.
2) If you want to use a separate website for workflow then create a website in IIS or you can use the default website. If you use default website the setup process will create a sub site under default website.
I have created a new website called AxWfl as shown above. It’s not mandatory to create a separate website for this but recommended.
3) Run AX setup file and install workflow. If .Net Business Connector is not installed AX setup will install it itself.
4) Once the setup process is done successfully open AX client.
5) From Basic main menu create a Calendar. Here I have created the calendar called 24Hours.
6) Create a batch job for workflow. Go to the Basic > Batch job list – user form and create a batch job. Here I have created a job called Wfl.
7) Go the Administration > Setup > Workflow infrastructure configuration wizard form.Run the wizard and follow the instructions and finish it.
8) Now make a setup for Purchase Requisition. Go to Accounts Payable > Setup > Workflow configurations form. Here configure the workflow with required conditions. A Workflow Configuration is bound to a single Workflow Template. In this process you need to select the calendar you created in step 5.
Once the purchase requisition workflow setup is over go to AOT > Forms > PurchReqTable > Designs > Design. Right click on Design then properties and check whether is Workflow Enabled or not.
9) Once you have done all these then create purchase requisition using respective user, perform all the tasks you instructed during workflow configuration/setup and submit it. After submission you can see the history of workflow.
10) Now open AX client using approver user id and see the task assigned and complete it.
Tuesday, March 27, 2012
Dynamics AX2009 Workflow – Checklist
I was going through the the workflow implementation with a client and could notice that there is a need of a check list for consultants users to configure the workflow and make it work . I have thought of the following points for the check list.
1. User options
3. Basic>Setup>Setting for workflow>settings for workflow to be used by the system to send workflow emails.
4. Configuration of the email template as identified in step 3 above. Basic>Setup>Email templates. FOr setting templates refer to the AX help file. Its a good source of information.
5. Ensure that the batches to process the alerts and the email messages are active.
a. Email batches – Administration>Periodic>Email processing> Batch.
b. Alert batches – Basic>Periodic>Alerts
6. Workflow configuration is configured properly . There should one default configuration . Additional configurations may be maintained with specific conditions for becoming active.
e.g. workflow on purchase requisition may have following setup
One active version per configuration must be maintained.
7. Workflow rules should be defined properly. If the tasks are being assigned on hierarchy basis then there must be a stop condition maintained ( This is the general error that users do not maintained a stop condition.)
8. Setup events when to generate a notification in an approval process.
I think if above check list is cross checked during setup or troubleshooting most of the errors / problems would be solved related to workflow . For rest of the problems leave them for consultants/developers to investigate on case to case basis.
1. User options
a. Maintain the email address of the users .2. Administration>Setup>Email parameters must be setup so that emails can be sent through AX.
b. Setup The parameters for receiving the notifications on the Notifications tab especially the two marked parameters for getting the notifications in client and or email.
3. Basic>Setup>Setting for workflow>settings for workflow to be used by the system to send workflow emails.
4. Configuration of the email template as identified in step 3 above. Basic>Setup>Email templates. FOr setting templates refer to the AX help file. Its a good source of information.
5. Ensure that the batches to process the alerts and the email messages are active.
a. Email batches – Administration>Periodic>Email processing> Batch.
b. Alert batches – Basic>Periodic>Alerts
6. Workflow configuration is configured properly . There should one default configuration . Additional configurations may be maintained with specific conditions for becoming active.
e.g. workflow on purchase requisition may have following setup
One active version per configuration must be maintained.
7. Workflow rules should be defined properly. If the tasks are being assigned on hierarchy basis then there must be a stop condition maintained ( This is the general error that users do not maintained a stop condition.)
8. Setup events when to generate a notification in an approval process.
I think if above check list is cross checked during setup or troubleshooting most of the errors / problems would be solved related to workflow . For rest of the problems leave them for consultants/developers to investigate on case to case basis.
Tuesday, February 7, 2012
AX 2009 Workflows: A Quick overview
Here is a quick overview on AX 2009 Workflow...a feature long awaited :)
Workflow - "Machine readible code for a business process"-Feature of Base AX 2009
-Workflow components reside on a Web Server
-Utilizes the Windows orkflow Foundation (.NET 3.0)
-Utilizes the AX Batch framework
-Requires AD User for Workflow
-Requires exclusive site on IIS to function
-The Workflow components on the Web server use the .NET BC to communicate with the AOS using Workflow system account(existing AX user).
Architecture overview:-
Setup (Steps):-
-Setup AD User for Workflow Account & configure in AX
-Setup & Configure IIS on Web Server
-Setup Workflow Component using AX installation option
-Run the Workflow Infrastructure Configuration Wizard {Batch Jobs, Workflow site}
-Configure the Workflow in AX
Workflow Objects:
Workflow templates:
Workflow Objects:
Workflow templates:
Workflow templates capture information about workflow categories , what business document the workflow will operate over, what workflow elements (Tasks and Approvals) are required in the workflow configuration,which application event handlers will handle the events that are raised as the workflow executes etc.The first step in creating a workflow is to add a workflow Template. A Workflow Template can be said to be the metadata A workflow template provides information on:
• Which workflow document to use.
• Tasks and approvals that can be configured by the user.
• Workflow categories used for assigning a workflow template to a specific module.
Workflow category:
The workflow category determines whether a workflow template is available in a specific module. After a workflow
category is created, it is possible bind the workflow category to a workflow template.
The workflow category determines whether a workflow template is available in a specific module. After a workflow
category is created, it is possible bind the workflow category to a workflow template.
A Workflow Configuration is bound to a single Workflow Template, and there can be multiple Workflow Configurations
for the same Workflow Template. Only a single Workflow Configuration for each WorkflowTemplate can be the default WorkflowConfiguration. The Workflow Configuration captures what tasks will be executed, who the tasks are assigned
to.
Workflow Query:
for the same Workflow Template. Only a single Workflow Configuration for each WorkflowTemplate can be the default WorkflowConfiguration. The Workflow Configuration captures what tasks will be executed, who the tasks are assigned
to.
Workflow Query:
Dynamics AX workflow uses a query to set up conditions for a workflow. The query identifies which data is available to workflow users. Queries are bound to Workflow templates. Once the query is created, a Workflow class needs to be created which contains the query name & any calculated fields.
Workflow Tasks:
AX workflow tasks are used to track documents or tasks from the start to the end of a work process. A workflow may
contain one or many tasks. Each task contain one step.
AX workflow tasks are used to track documents or tasks from the start to the end of a work process. A workflow may
contain one or many tasks. Each task contain one step.
Workflow Approvals are used to track ststus of Workflow documents . The fixed outcomes are ‘Approve’, ‘Reject’, or
‘Request Change’.
After you create a task, approval, or outcome in a AX workflow, it must be added to a menu item. The end-user can then start the task or approval using the menu item as a part of the workflow process.
Workflow can be activated throughout the various lifecycle stages of a business document: Create, Update, Delete, Post. The Workflow runtime will execute the Workflow and assign Tasks to users. Users interact with theWorkflow through Alerts/Workflow Tasks, from where they can take action (Approve, Reject) or they can navigate to the business document and view all details before taking the workflow action.
‘Request Change’.
After you create a task, approval, or outcome in a AX workflow, it must be added to a menu item. The end-user can then start the task or approval using the menu item as a part of the workflow process.
Workflow can be activated throughout the various lifecycle stages of a business document: Create, Update, Delete, Post. The Workflow runtime will execute the Workflow and assign Tasks to users. Users interact with theWorkflow through Alerts/Workflow Tasks, from where they can take action (Approve, Reject) or they can navigate to the business document and view all details before taking the workflow action.
No comments:
Post a Comment