Product Information
Adding Process Controls & Approval Form: Part 3
In this part of the blog post, I am going to use additional skills in the Process builder to model conditions which will determine the flow of the automation as well as the level of approvals.
Adding Process Controls
Process Conditions use an IF or Else rule to determine how the business process needs to be executed according to the conditions defined in the skill.
Click on the “+” icon and select Conditions from Controls.
The Conditions property will show up on the right hand side. Click on the “If” field to open up the Process Content panel to select the required field.
In this scenario, we are going to base the condition on “Hours Required”.
The condition will check if the Hours required is greater than 300 and accordingly branch the flow of execution. For now, we can keep the “EndEvent” as the target for both the branches.
Create and Configure Approval Form
For all requests which have Hours required greater than 300 hours, we need to route them to the employees’ manager for approval.
In this section, we would be creating an Approval Form. Using the “+” icon, select the option to create a new “Approval Form”.
In the popup window for “Create Form”, provide the form name and description.
We repeat the same process we followed when creating the Start Form. For demonstration, I have added the same fields to this form and made them as read-only. The only new field which is mandatory is “Manager Comments”. You would require managers to view the request and provide their comments before they action the request.
Save your changes and go back to the Process Builder and select the “Manager Approval” form. In the properties panel, you would need to make the below changes.
General Tab:
Set the Subject. This will show up in the Manager’s Inbox when a request arrives.
For the recipients, you would need to derive the manager of the employee who is raising this request. For simplicity, I am using “Process Started By” available in the metadata. This means whoever starts the request, will also get this approval request. I am using this for demonstration purposes to keep it simple and not having to deal with multiple logons.
Switch to the Inputs tab. Here, we need to map the fields from the context to the read-only field which need to show up in the Manager Approval Form. Except for “Manager Comments”, all other field can be mapped from the Process Content.
Notice the Outputs tab will have one attribute “Manager Comments” which would be used for the later.
Save all your changes. You will still see an error message for the “Manager Approval”. The Design Console will provide more information of such messages. This error message states that there are no outputs defined for this node.
Let’s define the outputs. Lets end the automation process if the manager rejects this request. Use the “+” icon to add an End event.
This should now resolve the design error.
In the next blog post, I will enhance this process with decisions based on rules to determine who the appropriate manager would be for a special project request.
Hi Murali Shanmugham great blog !!
You said for simplicity you made the requester and approver the same person. But what if I want to:
How would I do that, at least the first one?
Daniel
Hi Daniel,
I haven't tested this with multiple users. This should be similar to how we handled users/groups in Workflow Management.
You could either hardcode a user or derive it based on a decision and store it in a context (which can be mapped to the users field). To map a collection of users, we could use the Groups field. I was only able to find the documentation for this in the Workflow Management documentation. I am yet to try this out.
Hi Murali,
I am trying to replicate the above scenario. I am stuck at one point.
I have created an Environment Variable to define the 'No of hours' - for user defined purpose(eg; would like to provide 100,200 etc). However, I am unable to assign the no of hours value at the project level.
SAP Help directed me to declare this value in the 'Settings--> Cloud Studio Variables', but my environment variable that i have declared in the project level does not reflect here.
Any leads on this pls?
Hi Murali,
Is it possible to have parallel approval steps in Process Automation Workflow. We have a scenario where we need the workflow should go to multiple approvers at the same time and all of them should approve to proceed. Facing some challenges while implementing this scenario using process automation. Really appreciate if you can sheel some light on this.