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.





What is a workflow owner used for?

1 06 2010

When creating new workflow configurations in AX one of the first fields that you are required to fill in named ‘Owner’. But what exactly is the use of this field?

For those of you have been using workflow for a while you have probably started to find some of these uses. But for those of you who haven’t found them yet here are my observations:

Definition of a workflow owner: The owner of a workflow configuration is the user within Dynamics who is responsible for monitoring, maintaining and ensuring that workflow instances run smoothly and are completed in a timeous manner.

Pre-requisites for workflow owner users:

  1. Must be a user in Dynamics AX.
  2. Must be an active user (necessary for creating the configuration and receiving notifications etc about failed workflows).
    NB: making the user inactive after setting them as the workflow owner will work, but nobody will then be aware if issues arise.
  3. Must be linked to an employee (otherwise errors will occur stating the user has no relationship defined)
  4. Should have email alerts activated and correct email address setup (user options form) so that they can receive notifications of workflow issues.

Functions of workflow owners:

  1. Modify the workflow configuration.
  2. Receives notifications/alerts about webservice failures.
  3. Receives notifications/alerts about workitem failures.
  4. Can be used for assignment when using the role based option (assign to Workflow Owner)
  5. Can be used for escalation of workitems. E.g. If the work-item has not been actioned then it is the responsibility of the workflow owner to approve or reject.
  6. Can be chosen as the “Start From” user when using Heirarchy based assignment.
  7. Can be chosen as the recipient of custom workflow/workitem notifications e.g. Completed, Started, Stopped etc…
  8. Can be used as a field in workitem instructions, subjects and emails.

So far these are the uses and functions of the workflow owner that I have found through my wanderings in workflow configurations. Please feel free to add to this list or provide corrections where necessary.

Happy Wanderings





Workflow Tasks VS Approvals

19 04 2010

Have you looked at the tasks and approvals in Dynamics AX workflow and wondered why the two exist? Today we’ll look at a few of the differences and some potential ways in which they can be used in your workflow templates.

1) Approvals:
Approvals are designed for (as the name suggests) approval activities, where for example the document won’t necessarily be modified, mainly just reviewed and approved by one or more people. The approval activity may furthermore require a number of different levels of approval before the document is finally marked as approved.

For example. Contoso has a HR workflow process that requires the line manager to approve a job application, after that finance officer should approve it and finally if the position being applied for is at management level, at least half of the board should approve it.

We can accomplish this fairly simply with a workflow template with a single approval task created and 3 steps configured each being assigned to different people and having different requirements for the step to be started and completed.

2) Tasks
Tasks in Dynamics AX workflow differ from the above described approval activity in a couple of sometimes subtle but important ways.

  • Tasks can be assigned to multiple people, but only one person can complete it.
    Tasks in workflow are mainly designed for activities where the person being assigned the document is required to perform some form of modification to the document or task related to it. Thus only one person should be allowed to do it, in order to prevent conflicts or duplicate work being performed.

E.G. Using the above example: Once the application has been approved, it should then be assigned to an IT technician who has to create the successful applicant’s login details on the company network. Although there may be a whole group of people who can perform this job, only one person must actually do it or we may end-up with multiple accounts being created. This is where tasks come in. The person who configures the workflow can choose to assign the task to the group ‘IT_tech’ (IT technicians), each person will then receive item in their inbox, but only one person will be able to ‘Accept’ the task after which the task will be removed from all the other assignees. The person who then accepted the task can then action it according to how the workflow template was setup.

Note: If the task was configured to only be sent to one person, it will be automatically ‘accepted’.

  • Tasks can have multiple ways of completing or rejecting.
    In workflow there are times where you may want to have various ways to successfully complete a task.

E.G. Contoso has a new job opening. The posting is sent to John for publishing, he is tasked at reviewing the document adding the necessary information and then deciding whether to publish the article to the web or to publish the article internally.

One could either setup the job posting form have additional buttons such as ‘Publish to web’ or ‘Publish internally’ or we could create two completing outcomes in our template to execute these two different pieces of logic. The workflow history would then also maintain a record of what John decided to do.

So to summarise:

Approval Tasks
Assigned to multiple people Yes Yes
Only one person may complete No Yes
Multiple people may complete Yes No
Multiple completion outcomes No Yes
Multiple steps Yes No
Completion rules Yes No

I hope this helps clarify the difference between Workflow tasks and approvals in your minds. Please post any comments or questions about the way that you have used these two tools in Dynamics AX 2009.

Regards
Jonathan