Developing a Product Approval Workflow in Dynamics AX 2012
In this blueprint we will work through one example and show you how you can develop your own workflow process for product approvals that allow you to submit, track and approve the product review process.
Here are all of the topics that are included in this blueprint:
- Create a New Development Project for your Workflow Development
- Create a Menu Item for the Product Management Workflows
- Add the Workflow Editor Menu Item to the Product Area Page
- Create a New Workflow Category for Your Product Management Workflows
- Create a Base Enumeration to Track the Approval Status
- Add the Approval Status Field to the Product Table
- Adding the Approval Status to the Released Products Form
- Add a canSubmitToWorkflow Method to the Table to Enable Workflows
- Create a Query on the Products Table for the Workflows to Reference
- Create a Workflow Type Using the Workflow Wizard
- Create A Simple Product Approval Workflow
- Enabling Workflow Submission on the Product Details Form
- Updating the Submission Manager Method to Start the Workflow
- Relabel the Workflow Submission Menu Items
- Update the Completed Method on the Approval Event Handler
- Using the Tutorial Workflow Processor to Process Workflows
- Performing the Workflow Approval through the Dynamics AX Forms
Bonus Book Content
- Configuring the Workflow Processors to Run Automatically
- Creating a Class to Manually Run Workflow Processes
- Creating a New Product Approval Workflow Task Element
- Relabeling the Approval Action Menu Item Labels
- Update the Workflow Approval Element Event Handlers
- Add the Product Approval Element to the Workflow Template
- Using the Product Approval Element in the Approval Workflow
- Performing Product Approval Using the Custom Approval Element
In this walkthrough we showed how you can create your own workflow templates and activities. The product approval process could easily be extended out to include more steps and approvals for the products, allowing for it to be used for new product introduction and development.
This does not just have to apply to product approvals though, you can use exactly the same process to create workflow templates for the approval of other areas where the approval processes may be needed such as Customer, Vendors and BOMS. All you need to do is change the base tables and forms that are being referenced and the process will be almost identical.
You can also extend out the approval logic to update more information through the workflows like flags for allowing the use of the record after it has been activated, and also incorporating information that has been gathered during the process. If you want to get really creative, you can even create custom workflow elements that incorporate other technologies like Outlook for the creation of tasks and appointments.
Don’t be afraid to create new workflow templates, once you have built them, then they will provide a much better way to streamline your business processes, and the hour or so that you spend creating them will be recouped quickly by the removal of the manual workarounds that would have been used without them.
When i click Actions button i only see Cancel and View history menu item. Why other menu items don’t show (for ex. Approve…)
Did you create the task element for the workflow? Also, I think I remember that you need to run a CIL after Yu finish the coding to get the actions to register. Murray.
after setting security key for menuitems and rerun workflow infrastructure config, all working well 🙂
But i have one more question: i need to create workflow for setting value of Customer.Blocked field (this is enum with 6 elements). How to start it?
i followed all the steps mentioned by you, but still unable to see the workflow ribbon on the product details page.
can you please let me know what am i missing
Rajat, Did you do a full CIL compile? Also, I redid this entire walkthough ant made it available on Amazon – it goes into a lot more detail. You may want to check this version out: http://www.amazon.com/dp/1493772201/
I followed all the steps and also did a full CIL compile but I am unable to view the workflow ribbon on the product details page. Also if select ProductApprovalSubmitManager class, right-click and select open it gives me an error.
Args object not initialized.
(C)\Classes\ProductApprovalSubmitManager\main – line 4
Please let me know if I have missed a step.
Amrendra, sorry for taking so long to get back to you. Did you manage to debug the workflow. I’ve had this happen a couple of times and I just missed a step. I did create a more thorough guide and it’s available here: http://www.dynamicsaxcompanions.com/collections/configuration-blueprints-1/products/b01-developing-a-product-approval-workflow?variant=10916806465 Murray.
Hi Murray, when we have submit the workflow then status got change as in review but form is not getting refresh. need your help how to refresh the form based on workflow flow button clicked.