Blog

Microsoft Dynamics AX Blog

0

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.

Dynamics AX 2009 Workflow - Assignment - Role based

Dynamics AX 2009 Workflow - Assignment - Role based

By default, Dynamics AX 2009 comes with three participants:

  1. WorkflowUserGroupParticipantProvider:
  • List all configured User Groups in the system and assigns the workflow step to all users in the selected group
  1. 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.
  1. 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.

 

Workflow Approval Properties

Workflow Approval Properties

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.

Dynamics AX 2012 Event

Recent Posts

Tags

Archives

Random Testimonial

  • ~ Shibu Purushothaman, Sr. Programmer at WorleyParsons

    0bd63bf"Working with Amer was a pleasure. He is a true professional with in depth knowledge of Dynamics AX, .Net and other Microsoft Technologies. His professional approach to design, implementation and training made our migration to Axapta easy, and with very little down time. Another quality that I think deserves a special mention is that working with him is a pleasure, not even once did we feel uncomfortable with Axapta even though we were from a .net platform. He took time to attend to our doubts, and made the transition from .net to Axapta a very smooth ride. I highly recommend Amer and cant wait to work with him again."

  • Read more testimonials »