Configuring the complex workflows in AX2012

Hi Guys,

First of all, I’m happy to share that my last post on user permissions in AX2012 is been chosen as one of selective blog posts on Dynamicsworld website. Of course, it really gives good energy to go on.

Now, let’s focus on our topic for the day. We can’t deny that there could be some complex approval requirements which will let the consultants spend much time on configuring it. Also, there could be situations where we end up with no fruitful results though we invest much time on exploring how the different things work out.
Here is a requirement from few readers, thought it would help someone who starts configuring the workflows.

Case I: PR from Finance dept

If the PR amount = 20000 and if the PR creator from the Finance department, PR should be approved by Finance manager and plant head.

Case II: PR from Purchase department

If the PR amount = 20000 and if the PR creator from purchase department, purchase requisition should be approved by purchase department manager and Finance manager

If the PR amount >= 20000 and if the PR creator from the Finance department, PR should be approved by Purchase, Finance manager and plant head.

Case III: PR from Sales dept.

If the PR amount = 20000 and if the PR creator from Sales department, purchase requisition should be approved by sales department manager and Finance manager

If the PR amount >= 20000 and if the PR creator from the Finance department, PR should be approved by Sales manager, Finance manager and plant head.

While configuring the workflows always try to make it simpler, so that if in case it needs modification in future you should be able to do it without spending too much of your time in understanding how it is been configured.

Workflow configuratin to route to the approver based on amount and the department:

In the above case, the requirement is to consider both the PR Amount and the department, based on that we would need to route it the respective approver.

We’ve a conditional decision which can be used to check the condition and take it forward based on the result of the condition. Let’s use Conditional decision to identify whether PR amount is less than 20k or greater than that.
Under “Start node” drag “Conditional decision” node, then right click properties to define the condition. Set up the condition as below.

Conditional decision in workflows

Next, we should setup where it must go if it the condition result is true and to where if the result is False. As per our requirement, we again need to check that the PR has been submitted by which user’s department.
It is not a good idea to use the conditional decision now. You can achieve the result in a different way.
Add two “Approve purchase requisition” nodes to the True and false ends after which your workflow should look like this.

Workflow Approvals
Image: Complex workflow configuration
Double click the “Approve purchase requisition node to see the steps. Add the number of steps that you want, based on your requirement.
Step1 – To check if your PR is from Finance department, then assign it to Finance manager.
Step2 – To check if your PR is from sales department, then assign it to sales manager.
So, indirectly your steps would be your approval classifications according to the departments.
Right click on Step1> click Properties to set up the condition as below. Next, click “Assign user” tab and assign it to respective approver.
Approve PR - Step

Similarly, drag another step down to step1 and assign the condition, if the PRlines.department is “Sales” assign the user to sales manager.
Hope now your clear with how to set up remaining steps. The same 4 steps must be created in the “Approve PR node” which is at the “False” end of the conditional decision.

Hope you will like the post. Do the DAX to the MAX.Stay tuned for more.

Sunny

Advertisements

4 thoughts on “Configuring the complex workflows in AX2012

  1. Can u help me creating a purchase order workflow using hierarchy. I tried creating signing limits of document type Purchase Order but my workflow throws error.
    The conditions for workflow are:
    PO below $100 don’t require any approval
    PO above $100 and less than $1,000 require approval from a Sr. Manager
    PO above $1,000 and less than $10,000 require approval from Sr. Manager AND a Vice President.

      • Hi sunnysanthu, the error is below:
        Stopped (error): X++ Exception: Worker ID not set or record not found for %1, %2. Verify that the extended data type matches, and that the worker exists.
        at SysWorkflowHierarchyProvider-resolve
        SysWorkflowHierarchyProvider-resolveHierarchy
        SysWorkflowQueue-resume

  2. In the workflow I have set Assignment type Hierarchy and stop condition as: Employee.ApprovalLimit.PurchaseOrder>= PurchaseOrder.InvoiceAmount
    My hierarchy is working fine for purchase requisition.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s