Wednesday, 5 September 2018

AX : Work flow in Ax 2012


Few days back I got a chance to work on Ax2012 work flow, so I decided to document it for future reference and other user can also have an idea about it so here we start with what the work flow is.
What is Work flow :  A workflow represents a business process. A workflow defines how a business document flows through the system by indicating who must process and approve it.
Life Cycle:  Developer design the workflow based on customer requirements
System administrator configures the workflow.
End user run the workflow.


Bird's-eye view  :


Artifacts:
Work flow is revolve around the following artifacts 

  •          Workflow query
  •          Workflow category
  •          Workflow type
  •      Workflow approval 
  •      Enabling workflow on a form
  •      Work flow Configuration 
      Scenario : 
     scenario I need to implement work flow is :Create a custom document for submitting travelling allowance.
We Need to Cater Following Conditions in it
Assign workflow to If total amount is Less than $2500 than Line Manager Approval Required.
If Total Amount > 50,000 CFO Approval is required
If Amount > 1 Lac CEO Approval is required
Submitter can submit the workflow, approver can approve / Reject / Cancel the workflow.
TO implement above scenario I have taken / performed following task In order to accomplish it
Challenge:
If HOD of worker exists than it will go to HOD for Approval. Work flow will never through error in any case 
First thing First
Query

We must first create a query that will access the table fields for the workflow document. As shown in below image.

Category :
A workflow category is used to determine the module in which the workflow will
Be available. Refer to the image below

Type: It is the basic building block that can be used to create customized workflows that enforce business policies. A Work Flow type defines :
The Work Flow document to use.
Tasks and approvals that can be configured by the User.
Workflow categories used to assign a workflow type to a specific module.
Example of Work flow Type Properties is shown below
Approval :
Approvals are specialized workflow elements designed to support approval scenarios. Approvals have a set of fixed outcomes that the workflow supports. These outcomes are as follows:
§   Approve - Outcome type Complete.
§   Reject - Outcome type Return to the originator of the workflow.
§   RequestChange  Outcome type Change Requested to a specific person in the workflow process.

Example of Work Flow Approval is as shown in below image 

Enabling Work flow on Form:
Design:

Workflow Condition:


Important thing to remember:

Note there is a form named as “Tutorial_WorkflowProcessor” we Need to Start it while submitting / or taking any action on workflow Refer to below Image


Development Aspects:

Common Tables Involve in workflow development like if we want to get below information
Get Approval Date
 Get Approver Name
  • WorkflowTrackingStatusTable   
  • WorkflowTrackingTable;
  • WorkflowVersionTable
  • WFElementTble
  • WFStepTable 








No comments:

Post a Comment