Approval Flow Development
We will now develop a Form Action Flow to Approve the Create Notification and create a notification in SAP after approval,
Flow Development
Section titled “Flow Development”- In the Forms list, click on the
Flowsicon on theCreate Notification Workflowrow - A list of Flows will be displayed. Now click on the
Createbutton and choose theForm Actionflow- Title - Enter Approve Notification
- Description - Enter description as Approve notification create on SAP or similar
- Select the
On Approvaloption to indicate that this is a flow that will handle an approval step - Click on
Saveto create the flow
- You will now be navigated to the Flow Builder
Understanding the steps
Section titled “Understanding the steps”Before we develop the flow, let us draw a flow chart of the different steps we need to perform to save the data:
flowchart TD
A([Start]) -->|Form Approval Action| B[Run Workflow Approval]
B --> C{Error}
C --> |No| D{Decision}
C --> |Yes| Z([Return Error])
D --> |Approve| E[Create Notification]
D --> |Reject| Z
D --> |Next Approver| Y([Return Success])
D --> |Return Sender| Y
D --> |Error| Z
E --> Y
The above decision steps can be used to perform different steps in the Flow based on the decision the approvers have made.
Developing the Flow
Section titled “Developing the Flow”- In the Flow Builder, the
Add Nodedialog should already be open. If not, click on theForm Action Flowstart node and then click on the :fontawesome-solid-circle-plus: icon that is displayed below the node - Search for the
Workflow Approvalnode by typing in approval and clicking on it - The
Workflow Approvalnode is now opened and you can configure it.- Change the title to
Approve Notificationand remember to connect theForm Action Flowstart node to this node (else the expression builder will not display all the possible fields and nodes) - For the
Approval Formselect the Approve Reject Return template - For
Map Field NameselectForm Data - Click on the
Add Approvalbutton to add a level of approver(s). For this tutorial we will only add 1 level - Click on the dropdown labelled
1and choose one of the teams displayed. The approvers will all be from this team - Set the
Number Of Approversto 1 as we just want 1 person to approve for this tutorial - Now Click on the :fontawesome-solid-floppy-disk: icon and save the node
- Change the title to
- Now we need to create the Notification. Remember we already developed a flow to do that, so we will simply reuse it now.
- Select the
Workflow Approvalnode and then click on the :fontawesome-solid-circle-plus: icon - Search for the
Sub Flownode by typing in sub flow and clicking on it - The
Sub Flownode is now opened and you can configure it.- Change the title to
Create Notificationand remember to connect theWorkflow ApprovalApprove decision of the node to this node (else the expression builder will not display all the possible fields and nodes) - For
Workflowclick on the dropdown and select the Create SAP Notification flow - Let the flow run as a part of the parent flow.
- We do not need to set any additional parameters as the form data will automatically be passed to this Sub Flow
- Now Click on the :fontawesome-solid-floppy-disk: icon and save the node
- Change the title to
- Connect the
Create Notificationnode to Success - For this tutorial we will handle
Reject,Return To SenderandNext Approveras workflow approval completion by connecting toSuccessnode as we do not want to perform any additional steps - Now click on Publish button to save and compile the flow. If the compilation is successful it will also be published and we can run it to test.
Testing the Flow
Section titled “Testing the Flow”We cannot test the Approval flow from the Run option as the approval needs to be sent to user(s) and they need to take an action.
Login to Turbo Forms App
Section titled “Login to Turbo Forms App”Now login to the Turbo Forms App on web or mobile as the same user and click on the + button to create a new form to fill and choose the Create Notificaiton Workflow form. After filling all fields click on Request Approval. The notification form is now submitted and will start a workflow approval. The form is also listed under Requests in the Approvals tab in the App.
The other users who are part of the team will receive a notification that an approval request has been received. When they open the form they will be able to see the Approval form txemplate. They can enter a comment, sign the approval and click on Approve. Since we requested only 1 level of approver and a single approver is sufficient the approval is successful and the notification is now created. The original request form if you now open you will see an additional Approval section and will see the user who approved it and also their signature and comments. If you had added the step to post a text message to MS Teams you can also see the notification creation result there.
Topics Covered
Section titled “Topics Covered”- Developing a flow to start an approval process before creating a notification
- Choose the approval levels and also the Approvers and number of approvers
- Running the flow by submitting the request in the Turbo Forms App