Using Conditions to Control the Process Flow

Objectives

After completing this lesson, you will be able to:

  • Create and configure process conditions
  • Create a Process Condition and adjust the process flow

Introduction: Using Conditions to Control the Flow

Intrduction

Sometimes, a process is not only a sequential flow of steps, but it branches down one path or another based on the business situation. In this lesson, you will learn how to add a process condition, which routes the business process based on certain criteria. These conditions apply an "If or Else rule" and the business process responds according to the rules defined in the condition settings of the process. So, if the expression has the definition of the condition, the Else expression holds the instruction about what to do if the condition is not met.

With SAP Build Process Automation, you can automate your process to take different conditional routes, without writing a single line of code. Now we’ll show you how to do that. You’ll use process conditions to get rid of unnecessary approvals by routing the process for auto-approval, or for a one-step-approval flow, based on the sales order criteria. For example, a sales order less than a certain value, say 50,000, does not need approval, and all other sales orders will undergo one-level approval.

Creating and configuring a process condition

Now that you have designed a process with forms and automation, let us define which process flow should run based on the If/Else conditions that decide which process flow is executed and whether there will be an auto-approval or a one-step approval route.

Create a Process Condition and Adjust the Process Flow

Business Scenario

You will learn how to use process conditions in a business process to get rid of unnecessary approvals when the process is routed for an auto-approval or one-step-approval flow, based on the sales order criteria.

A process condition routes the business process based on certain criteria. These conditions apply an If/Else rule to the process content, and respond according to the rules defined as settings in the process builder.

To learn more about how to create a process condition and adjust the process flow, follow this interactive tutorial.

Exercise Options

To carry out this exercise, you can choose from the following options:

  1. Live Environment: Using the instructions provided below, you can perform the steps in your SAP BTP account.
  2. Platform Simulation: Follow the step-by-step instructions within the simulation.
  3. Side-by-side: Follow the step-by-step instructions within the simulation and perform the steps in your SAP BTP account simultaneously.
Note
We strongly recommend to perform the steps in the live environment.

Task 1: Create a Process Condition and Adjust the Process Flow

Steps

  1. Create a process condition.

    Use the following data:

    FieldValue
    Value100000
    Conditionis equal to
    Value 1India
    Value 2Germany

    1. Choose Add.

    2. Choose ControlsCondition.

      Process content will contain a list of attributes that have been defined in previous skills. You can see the attributes from the trigger form. You will use this process content to configure different skills during business process modeling.

    3. Choose Open Condition Editor.

    4. Choose Item.

    5. Choose Order Amount.

    6. To select a Condition, open the list.

    7. Choose is less than.

    8. In the Value field, enter 100000.

    9. Choose Apply.

    10. Choose Open Condition Editor.

    11. Choose Add Group.

    12. Choose Any.

    13. Choose Item.

    14. Choose Shipping Country.

    15. As Condition, choose is equal to.

    16. In the Value field, enter India.

    17. Choose Item.

    18. Choose Shipping Country.

    19. As Condition, choose is equal to.

    20. In the Value field, enter Germany.

    21. To expand the Summary pane, choose the arrow.

    22. To view more details of the summary, choose the scroll bar to scroll down.

    23. You can now see the defined process conditions in a more readable format in the Summary section.

    24. Choose Apply.

    25. Link the Default branch to the Approval Form.

      With this process condition, only the sales order above a specific amount will be sent for approval, and the rest will be auto-approved.

    26. With this process condition, only the sales orders above a specific amount will be sent for approval, and the rest will be auto-approved.

  2. Add another form.

    Use the following data:

    FieldValue
    NameAuto Approval Notification
    IdentifierautoApprovalNotification (auto-filled)
    DescriptionNotification form to inform auto approval of the sales order
    HeadlineAutomatic Order Confirmation
    Paragraph|ParagraphYour order has been received and we will send you the details as soon as the order is shipped. You can find the details of your order below, please review and verify your request:
    Paragraph|ParagraphYour Sale’s Order Details:
    text|LabelOrder Number
    Configuration of Order NumberRead Only
    Number|LabelOrder Amount
    Configuration of Order AmountRead Only
    Date|LabelExpected Delivery Date
    Configuration of Expected Delivery DateRead Only
    Paragraph|ParagraphPlease choose the SUBMIT button to acknowledge the order status

    1. Choose Flow line.

    2. Choose Delete.

    3. Choose Add.

    4. Choose FormsNew Form.

    5. In the Name field, enter Auto Approval Notification.

    6. In the Identifier field, you do not have to enter anything.

    7. In the Description field, enter Notification form to inform auto approval of the sales order.

    8. Choose Create.

    9. Choose More.

    10. Choose Open Editor.

    11. Drag Headline 1 and drop on Auto Approval Notification.

    12. In the Headline field, enter Automatic Order Confirmation.

    13. Drag Paragraph and drop on Auto Approval Notification.

    14. In the Paragraph field, enter Your order has been received and we will send you the details as soon as the order is shipped. You can find the details of your order below, please review and verify your request:.

    15. Drag Paragraph and drop on Auto Approval Notification.

    16. In the Paragraph field, enter Your Sale’s Order Details:.

    17. Drag Text and drop on Auto Approval Notification.

    18. In the Label field, enter Order Number.

    19. Choose Read Only.

    20. Drag Number and drop on Auto Approval Notification.

    21. In the Label field, enter Order Amount.

    22. Select Read Only.

    23. Drag Date and drop it on Auto Approval Notification.

    24. In the Label field, enter Expected Delivery Date.

    25. Select Read Only.

    26. Choose the scroll bar to scroll down.

    27. Drag Paragraph and drop on Auto Approval Notification.

    28. In the Paragraph field, enter Please choose the SUBMIT button to acknowledge the order status.

    29. Choose Save.

  3. Configure the auto approval notification step of the process.

    In the following steps, you will configure the auto approval notification step of the process.

    Use the following data:

    FieldValue
    Subject(enter) Your Order.
    Subjecthas been successfully received
    UsersProcess Started By
    1. Choose the Order Processing tab.

    2. Choose Auto Approval Notification.

    3. In the Subject field, enter Your Order.

    4. Choose Subject.

    5. Choose Order Number.

    6. In the Subject field, enter has been successfully received.

    7. Choose Users.

    8. Choose Process Started By.

    9. Choose Inputs.

    10. Choose Select Item.

    11. Choose Order Number.

    12. Choose Order Amount.

    13. Choose Order Amount.

    14. Choose Expected Delivery Date.

    15. Choose Expected Delivery Date.

    16. Choose Zoom to fit.

    17. Drag Submit and drop on End.

    18. Choose Save.

    19. This is the result:

Result

You have successfully created a process condition and adjusted the process flow.

This concludes the interactive tutorial.

Log in to track your progress & complete quizzes