AX 2012 Workflow Observations – Providers

6 06 2011

Hi all.

I’ve just started delving into the goodness of AX2012 workflow and will hopefully over the coming days and weeks be posting some of the more interesting aspects and new aspects of AX 2012.

When opening the AOT in AX2012 and looking into the workflow node one notices a number of interesting changes.

1. Workflow Templates are no longer this in AX2012, rather they are called Workflow Types.
2. There is a new node named Automated tasks
3. There is a new node called “Providers”.

Todays focus is specifically on this last node, the providers node. In AX2012 is appears that Microsoft has decided to do away with requiring developers to lock into a specific provider for each of their tasks or approvals. Rather the provider can now dictate what workflow templates (workflow types) it supports. In other words I believe all the tasks or approvals that are part of a workflow type can now make use of any of the providers that have been made available to the Workflow Type. So for example a purchase requisition completion task could at configuration time, allow the administrator to select either a user group (using the WorkflowUserGroupParticipantProvider) or some form of role using the WorkflowRoleParticipant provider.

AX 2012 Approval Properties

AX 2009 Approval Properties

Providers can be setup to either be accessible to all Workflow Types or only a specific set of Workflow Types. These changes seem to be applicable to all types of providers including DueDate providers, participant Providers, hierarchy providers and the new type “Queue” Providers.

The Participant provider classes themselves (the provider nodes just link to these) seem to be similar to their Ax2009 counter-parts. Microsoft has expanded their list of out the box providers quite significantly and now deal with with a number of Dimension Driver expenditure providers.

My initial thoughts so far is that this improvement will significantly improve configuration time customisations and provide a greater level flexibility without having to get developers involved.


Workflow Development Manual

29 07 2010

Two weeks ago now I reviewed the Installation and configuration document written by Sumit Loya for Microsoft Dynamics AX Workflow. As a followup, today I would like to mention one of the other useful sets of documentation that he has written. Namely “Workflows – Development – An easy to understand guide for creating new workflow templates in Microsoft Dynamics AX 2009”.

In this excellent document Sumit takes one through all the various artifacts and components that form a part of a Dynamics AX template, explaining why they exist and how you will be using them in your own customisations and/or creation of templates. He describes the various properties available for each component and their uses in a fair amount of depth (very handy if you’ve ever wondered what some of the more obscure properties do), providing examples as he goes.

The document also includes great sample code for the creation of your own WorkflowDocument, Action Manager, Event Handler and Workflow classes.

All in all if you want to have a thorough learning experience on how to create workflow templates. This document should most definitely be your starting point!!! You will be left with an in-depth understanding of not only how to create templates, but also of how the workflow components communicate and tie together.

Thanks again Sumit.

Check out the original post over here.
Download the document from Axaptapedia here.

Dynamics AX Workflow Error: Specified argument was out of the range of valid values Parameter name: constraintDate.

26 07 2010

I’m was busy modifying a pre-existing workflow template of mine, by adding an additional task. I decided that the task should not be contrained by any due dates, so I didn’t provide any Due Date Provider for my task. I was able to re-configure my workflow with the new task without any issues. However after submitting my record, my workflow history reflected that my task had been started, but no users were assigned. Debugging my workflow revealed that the Participant Provider was functioning correctly and returning the correct user, but yet my workitem was not being assigned. On further investigation the event log on the IIS server revealed the following message:

Workflow instance: 6f5ac316-52b3-48f0-b401-93af89889a21 was terminated for the following reason: Specified argument was out of the range of valid values.
Parameter name: constraintDate.

Now I’m not sure what the real cause of the problem is, but after adding a Due Date Provider to my task and re-configuring accordingly the workitem was successfully assigned.  Hopefully I will come to a conclusion as to why I am unable to leave the Due Date Provider property empty sometime in the future, but for the moment this is a successful work around for my issue.

Happy Daxing.

Example of how to configure a workflow in Dynamics AX 2009

7 07 2010

Following on after last weeks post regarding the available documentation for Dynamics AX workflow. I had a chance to read through the chapter (chapter 4) on Purchase Requisitions in the Microsoft Dynamics AX 2009 Trade and Logistics II manual. This chapter provides very nice walk-though of the various components involved in configuring workflows in Dynamics AX 2009 including using Heirarchy assignment with approval limits, conditional approvals, automatic actions (automatic approvals based on value), escalations, notifications, due dates, security setups for workflow actions, workflow tasks, approval steps etc… If you are configuring any type of workflow template this is a good read to get started.

If however you are a developer like myself, using this tutorial is really helpful to get you started if you want to try and reverse engineer a workflow template to discover how to implement heirarchy providers, limits checking, calculated fields, security etc…

Happy Daxing

Dynamics AX Workflow Participant Provider: Assignee is not specified or the user is not enabled

4 02 2010

Just got this error when trying to create my first configuration for a template that I had just created. “Assignee is not specified or the user is not enabled.” I had to go through quite bit of code to eventually discover where the error was sitting. Essentially you cannot create a configuration if your WorkflowParticipantProvider does not return any tokens from the getParticipantTokens method.  If the provider is using enums to generate tokens it should not be a problem, but if you are using a database table to return the tokens you may run into hassles if the table is empty.

Hope that is helpful to someone somewhere.

%d bloggers like this: