I have faced this error twice, I sloved it the first time by “Enabling the 32-bit Applications” on the application pool level of the workflow.
But in another time the installation was on Windows 2008 R2, and this made things harder. Enabling the 32-bit Application did not solve the issue. This actually happened because of the conflict in this Windows between the .NET framework 2.0 and .NET framework 4.0. It also might be caused of an authentication issue, so you better check that all one by one to get this validation problem resolved.
To solve the issue, I basically have gone through these steps: (of course I followed those steps after installing the workflow and I did not uninstall it)
-
Deleted the application from the IIS (the selected node in the picture below).
-
Added a “Virtual Directory” to the same site and named the new virtual directory with the same name of the deleted application.
-
In the physical path of the virtual directory, I pointed to the installed worklfow folder (most probably will be in “C:Program FilesMicrosoft Dynamics AX50Workflow“). This folder contains the web services of AX workflow.
-
Then, I converted the new “Virtual Directory” to “Application” by right-clicking that directory and clicking “Convert to Application”.
-
I went to permissions of that application, by clicking (selecting) the “Applicaiton” you have just converted and double clicking “Authentication” and I insured that “ASP.NET Imporsenation” and “Windows Authentication” are enabled and any other things are disabled.
-
(Optional) You might disable the Kernel-mode authentication for the Windows Authentication by clicking the “Advanced settings” for the Windows Authenticaion. You cannot do that if if you have a kerberos authentication configured in your environment, if not.. then you better disable it to improve your environment performance.
-
I then went to the “Handler Mapping” of the Workflow Application. I selected “WebServiceHandlerFactory-ISAPI-2.0” and then clicked “Edit”. I insured that the “Executable” path is pointing to the .NET framework version 2.0 32-bit. (Note that this Windows contains on two versions of framework handlers and in two different folders inside the “C:WindowsMicrosoft.NET” folder.) In our case, you always have to point to the “aspnet_isapi.dll” file in the “Framework” folder not “Framework64”.
By this, you will be able to browse anyone of the *.asmx files in the Workflow Application. Also you might validate your workflow configuration.
Hopefully it has been resolved to you as well.
As I have mentioned in an earlier post, to get my life easier with developing new Dynamics AX Workflows I have created an easy to use wizard that generates AOT objects for one Approval workflow in Dynamics AX 2009, without writing a single line of code. I have used this wizard since more than a year to develop all the workflows that I had to develop.
I have been asked many times by Dynamics AX technical and functional consultants to share that with them. And here I am sharing it with the Dynamics AX community.
By following three steps, Dynamics AX Workflow for Dummies simply:
- Adds a Workflow Template
- Adds a Workflow Category
- Adds a Workflow Approval
- Adds a workflow state field to the selected table
- Enables the workflow for the selected form
- Creates needed classes like the document class for the workflow document
- Creates a query (Workflow Document)
Here are the steps that you have to follow: (pictures speak quietly)
After clicking Finish, you would get a Dynamics AX Project:
In order to configure the generated Workflow template, go to the module that you have selected in the wizard, and open the Workflow Configuration under the Setup menu of that module. This is what you will have:
If you are interested to have it, just comment on this post and write me your email or send me an email to amer@amerax.net and I will be more than happy to send the project to you.
I also would welcome any feedbacks on this.
A question might come to your mind, what’s the difference between a Dynamics AX 2009 Workflow Task and a Workflow Approval in AOT. They both are having almost the same properties and you could attach them to a workflow template.
The workflow in Microsoft Dynamics AX 2009 is managed in a way that enables the workflow designer (who does the workflow configuration, a functional consultant in most of the cases) divides one “stage” approval into multi steps.
For example, if a Leave Request needs to be approved by the HR department, then the case might be in a way that approval must be processed by an HR Assistant and NOT the HR Manager in case that the leave does not exceed three days. But if the Leave Request is for more than three days… the HR manager must approve it also.
To enable this scenario, the workflow should be fixable so that the workflow designer is able to add as many steps per one approval “stage” as he likes. This is done by adding a Workflow Approval to the Workflow Template. When you go and configure this workflow template in the Workflow Configuration, you will be able to add as many steps as you wish… and you could also configure each step by specifying who this step will be assigned to and in what condition. And the workflow approval stage will not be completed unless all the steps are completed.
Now for the Workflow Task, this cannot be done. A Workflow Task represents only ONE STEP of a Workflow Approval. The workflow designer cannot add steps to this Task; he only could assign a person and a condition for this step/task. Task is nothing but a single unit of work.
The following image describes what I said:
Another differnce is that a a task does not have a fixed outcome. However, you can add any number of custom outcomes to the task, such as Completed or Skipped.
When you install Dynamics AX Workflow, you might install it on a different machine that the AOS, like a web server for example. In this case, you have to install the following on the workflow server to get your workflow works:
- IIS
- .NET Business Connector
- Create a new website on IIS (do not use the same of WSS or EP websites, it is recommended not to use an existing website even)
- Workflow
Before going into step number “4”, you have to configure the “System service accounts” in: Dynamics AX –> Administration –> Setup –> Secuity. Fill these fields like the following:
- Busienss Connector Proxy: create a domain account and assign it here, this user doesn’t have to be a Dynamics AX user.
- Workflow System Account: Select a user like the Administrator from the drop down list
- Workflow Execution Account: like the previous step
Now you should be able to go through the step “4”, and install the Workflow component.
After installation, go to Dynamics AX –> Administration –> Setup –>Workflow insfrastructure configuration wizard. If you are getting an error after installing Dynamics AX Workflow: “401 Unauthorized”, then insure that you go through the following:
- AOS Service is running under an active domain user (domainusername)
- Workflow website and workflow application pool are having the same .NET Business Connector user name Identity (and of course, this should be an active domain user)
- You added the workflow website (http://servername:portnumber/DynamicsAXWorkflow50 for example) to the trusted sites in Internet Options of AOS server
- Run the following on the Workflow server:
- �
- Start a command prompt.
- Locate and then change to the directory that contains the Adsutil.vbs file. By default, this directory is C:InetpubAdminscripts.
- Type the following command, and then press ENTER:
cscript adsutil.vbs set w3svc/NTAuthenticationProviders “NTLM”
- �
- To verify that the NtAuthenticationProviders metabase property is set to NTLM, type the following command, and then press ENTER:
cscript adsutil.vbs get w3svc/NTAuthenticationProviders
The following text should be returned:
NTAuthenticationProviders : (STRING) "NTLM"
By this, workflow infrastructure configuration wizard should work fine now.
Workflow in Dynamics AX 2009 is interesting technical part of this lovely product. When you try to develop/create a new workflow in Dynamics AX you might get confused of the so many menu items and classes that you create, and sometime you don’t even know what these classes’ handlers and menu items are used for. That’s why when I first learned how to create workflow in Dynamics AX one year ago; I created a pretty easy-to-use wizard that creates for you a workflow with all the necessary objects like Workflow Template, approval, category, classes and menu items. Furthermore, this wizard enables the workflow on the selected form and its main table.
One of the important classes that you need to set at the approval process is the participant provider. The goal of this property is for the workflow to decide who will be the participant user for this step of workflow. To do that, you have to extend WorkflowParticipantProvider class and overwrite the methods: getParticipantTokens that fills the list of options in the Role Based section of and resolve that will decide the exact user based on some X++ and the selected option in Role Based list.
By default, Dynamics AX 2009 comes with three participants:
- WorkflowUserGroupParticipantProvider:
- List all configured User Groups in the system and assigns the workflow step to all users in the selected group
- ProjWorkflowParticipantProvider:
- This is for Purchase Requisition workflow. List some tokens like Project Manager, Project Controller, Project Sales and others and assigns the workflow step to the assigned person of the Purchase Requisition project.
- TrvWorkflowProjParticipantProvider:
- This is for Expense Management workflow. List tokens like Project Manager, Project Controller, and Project Sales and assigns the workflow step to the assigned person of the expense project.
So simply, when you need to specify participants based in your criteria, you need to do exactly the same of those classes, by overwriting getParticipantTokens and resolve.
A very nice article has been posted in MSDynamicsWorld.com by Scott Hamilton about workflow in Microsoft Dynamics AX 2009. It shows by more than one example how workflow could be effectively implemented so it serves organization processes needs.
This article is excellent for those who haven’t experienced the workflow yet in Microsoft Dynamics AX 2009. It doesn’t require any technical background.
Microsoft has added a very useful functionality in the new release of Microsoft Dynamics AX 2009 that is: Workflow. I have explored many articles by Microsoft and others about Workflow in Microsoft Dynamics AX 2009. For the technical articles part, all of them are describing the workflow in a technical format that prevents the reader from seeing the whole picture of this functionality that has been delayed a lot. This is so important to be known.
Microsoft did not implement the workflow inside Microsoft Dynamics AX itself, they preferred to use WWF (Windows Workflow Foundation) that has been released with the .NET Framework 3.5. WWF is a new feature that builds and executes workflows inside .NET applications. WWF workflow engine, the one that runs the workflow inside Microsoft Dynamics AX 2009, is published and configured in the IIS. The following diagram shows you how this happens:
By this, Microsoft has gained the advantage of the new functionalities that would be added later on WWF without upgrading Microsoft Dynamics AX itself (for most of the cases at least). And this is a great example of what you can do when using .NET business connector of Microsoft Dynamics AX.
In the following picture, you could see that workflow runtime, currently, is residing inside IIS.
Someone might ask: why did’nt Microsoft lunched the workflow runtime on the AOS of Dynamics AX. Actually Microsoft is planning to do so in the soonest (this might be in Microsoft Dynamics AX 2010). But they have made it on IIS because the AOS is written in a native code, not in a managed code. And since WWF is part of “very managed” .NET environment, it’s time and effort consuming for them to make such integration. So they simply put the workflow runtime on the IIS till they completely convert the AOT into managed code.
You guys could benefit from a video that has been recorded in PDC 2008. Josh Honeyman, a Senior Development Lead at Microsoft, shows how workflow is implemented in Microsoft Dynamics AX 2009 and its future. To watch the video, press here.
Search the site
Dynamics AX 2012 Event
Recent Posts
- D365FO | Cannot Connect to SQL Server Database on Your Cloud Test Machines
- Intro to Microsoft Dynamics AX in Arabic – سلسلة حلقات مايكروسوفت داينامكس إيه إكس بالعربية
- Microsoft Dynamics Launch – Sunday, 24th February – Intercontinental Hotel, Riyadh
- Files of Our AX Brains Dec 2012 Event
- It was a great day!
- Tomorrow is the day for our Dynamics AX Brains Technical Seminar
- Dynamics AX Brains December 2012 Technical Seminar
- Windows Server 2012: Built from the Cloud Up
Tags
Archives
- October 2019 (1)
- January 2014 (1)
- February 2013 (1)
- December 2012 (4)
- September 2012 (2)
- December 2011 (2)
- November 2011 (3)
- July 2011 (3)
- June 2011 (4)
- May 2011 (3)
- April 2011 (4)
- March 2011 (12)
- February 2011 (2)
- January 2011 (3)
- December 2010 (1)
- November 2010 (1)
- October 2010 (5)
- August 2010 (1)
- July 2010 (3)
- June 2010 (4)
- May 2010 (5)
- April 2010 (1)
- March 2010 (9)
- February 2010 (4)
- January 2010 (4)
- December 2009 (11)
- September 2009 (1)
- August 2009 (1)
- July 2009 (2)
- September 2008 (1)
Random Testimonial
- ~ Mohamad Adel, Sr. Dynamics AX Developer at Al-Fanar IT
"I recommend Amer Atiyah as i worked with him in many simple and complicated tasks and i realized that he is very intelligent in the way of thinking to solve tasks problems. He has a very good experience and knowledge of his job. He is very hard worker, committed, organized and creative and very open mind in his work and that is the reason if his brilliant in his specialized field. He is always showing a high degree of professionalism and ability to deliver and accomplish very complicated tasks at any condition with high quality. I am recommending him to work in any team and i know he will fit with all challenges. Purely, he is a professional guy. I wish to him more and more success in his career and his life."
- Read more testimonials »