In this article we will elaborate how to create an Approval Workflow. Before proceeding further, make sure that you have gone through the Approval Workflow introduction article, that elaborates the key concepts that would be employed to create the workflow. Additionally, The Manager in User Profile article deals with how CodelessONE can be used to make any user of the application the manager of another user. Take a look at that article as well.
Uma Jenkins and Karen Ellis run an online store, selling common items. where Uma is Karen’s boss. Now whenever Karen adds a product, worth 10000 monetary units, it goes to Uma for approval, as the store usually does not deal in such expensive items. If Uma approves then the item can be placed for sale, otherwise the item’s record (in the system) is sent back to Uma for reconsideration.
Step 1: Invoke Approval Workflow
Click the App Settings icon and then select the Application Settings option.
Click the Approval Workflow option from the App Settings panel.
Click the + Create Approval Workflow button.
The Approval Workflow window is displayed.
Step 2: Set header information
Set required data in the header section. If you want to make this a sub-flow then enable the checkbox.
Step 3: Set the condition
This section deals with when the approval workflow would be triggered. Referring to our usecase, the when control would be set with the Product object.
The is control could be set for any of the two values. If we want to cater both then we would have to create another approval workflow.
The by control is set for who creates the record that would trigger the Approval Workflow. Assuming that Karen has admin role, we select Admin here.
Click the + Add Condition button.
Create the relevant condition, that would trigger the event.
Step 4: Set the approver and the outcomes of their actions
Now we are going to set who would approve the workflow, in case Karen (using the Admin role) creates a product worth 10000. Since Uma is Karen’s manager, we would select the creator’s manager option.
What happens if Uma approves? What if she rejects? Both outcomes are configured next, using sub-flows, if they exist.
Comments can be determined if required, optional or not required.
Click Save Workflow button, to complete the process.
The Approval Workflow is created.
Now whenever Karen creates a product worth 10000 or more, an approval request would be sent to Uma for approval. The approval process is discussed here.