Skip to content

Approval Flow Development

We will now develop a Form Action Flow to Approve the Create Notification and create a notification in SAP after approval,

  1. In the Forms list, click on the Flows icon on the Create Notification Workflow row
  2. A list of Flows will be displayed. Now click on the Create button and choose the Form Action flow
    • Title - Enter Approve Notification
    • Description - Enter description as Approve notification create on SAP or similar
    • Select the On Approval option to indicate that this is a flow that will handle an approval step
    • Click on Save to create the flow
  3. You will now be navigated to the Flow Builder

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.

  1. In the Flow Builder, the Add Node dialog should already be open. If not, click on the Form Action Flow start node and then click on the :fontawesome-solid-circle-plus: icon that is displayed below the node
  2. Search for the Workflow Approval node by typing in approval and clicking on it
  3. The Workflow Approval node is now opened and you can configure it.
    1. Change the title to Approve Notification and remember to connect the Form Action Flow start node to this node (else the expression builder will not display all the possible fields and nodes)
    2. For the Approval Form select the Approve Reject Return template
    3. For Map Field Name select Form Data
    4. Click on the Add Approval button to add a level of approver(s). For this tutorial we will only add 1 level
    5. Click on the dropdown labelled 1 and choose one of the teams displayed. The approvers will all be from this team
    6. Set the Number Of Approvers to 1 as we just want 1 person to approve for this tutorial
    7. Now Click on the :fontawesome-solid-floppy-disk: icon and save the node
  4. Now we need to create the Notification. Remember we already developed a flow to do that, so we will simply reuse it now.
  5. Select the Workflow Approval node and then click on the :fontawesome-solid-circle-plus: icon
  6. Search for the Sub Flow node by typing in sub flow and clicking on it
  7. The Sub Flow node is now opened and you can configure it.
    1. Change the title to Create Notification and remember to connect the Workflow Approval Approve decision of the node to this node (else the expression builder will not display all the possible fields and nodes)
    2. For Workflow click on the dropdown and select the Create SAP Notification flow
    3. Let the flow run as a part of the parent flow.
    4. We do not need to set any additional parameters as the form data will automatically be passed to this Sub Flow
    5. Now Click on the :fontawesome-solid-floppy-disk: icon and save the node
  8. Connect the Create Notification node to Success
  9. For this tutorial we will handle Reject, Return To Sender and Next Approver as workflow approval completion by connecting to Success node as we do not want to perform any additional steps
  10. 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.

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.

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.

  1. Developing a flow to start an approval process before creating a notification
  2. Choose the approval levels and also the Approvers and number of approvers
  3. Running the flow by submitting the request in the Turbo Forms App