Create a Simple Product Approval Workflow
Now that we have created our workflow, we can actually create a simple approval workflow through the workflow designer.
NOTE: This is part of the Developing a Product Approval Workflow in Dynamics AX 2012 blog series where we show how to develop a completely new workflow to manage the new product approval process. If you want to see all of the other posts in this series, click here.
How to do it…
To create a new product approval workflow, follow these steps:
- From the Product information management area page, select the Product information management workflows menu item that we added in the previous steps.
- This will send you to the workflow list page, which will be blank right now because there are no workflows defined for the Product Management category.
- Click on the New button in the New group
of the Workflow ribbon bar. This will open up a Create workflow dialog box that will list any workflow types that you have associated with the form. Double click on the workflow that you just created, to create a new design for the workflow.
- When the workflow designer canvas is displayed, drag a Manual decision action over from the Workflow elements palette and put it under the Start element.
Then drag the connectors to join up the three elements, creating a decision path for the approval.
Tip: All of the missing details will be displayed in the Errors and Warnings section. Rather than hunting them down through the ribbon bar, just click on them one by one and you will be taken to where configurations are missing.
- First set the Assignment type to User.
- Switch to the User tab and assign a user to the task.
- Then in the Manual decision step assign a Name, Work item subject and some Work item instructions.
- Also, in the Outcomes tab, set the Outcomes to Approved and Rejected.
- Finally, add an explanation of the workflow in the Submission instructions.
- When you return to the designer canvas, you should se no more errors in the Errors and warnings pane, and you can click the Save and close button to commit the changes.
- Give your version some notes to explain what it is used for, and then click the OK button.
- To finish the process, activate the workflow by selecting the Activate the new version radio button, and then click the OK button.
How it Works…
When you return to the workflow list, you will be able to see your new Product Approval workflow.
Hello, I’m trying to do a workflow, but in step 3, when I click the button to create a workflow using the previusly created,error : “Workflow threw an exception for the following reason:Can not create an instance of the class ProductApprovalDocument”.
I think it may be due to configuration issues, or something similar, because I have followed other tutorials and gives me the same error, I followed your tutorial step by step, but I fail to step 4 because it shows me the error.
Nacho, you may want to check out this guide that I created a while back – it extends out the original presentation and also fills in a couple of gaps & bugs that I had in the document: http://www.dynamicsaxcompanions.com/Configuration-Blueprints/Developing-A-Product-Approval-Workflow. Murray.