Skip to main content

Modify the Telework Case Approval Flow

Now that we have created the People Finder Spoke and our Auto Approval Decision Table, let's modify the Telework Case Approval Flow to allow auto-approval for those that were pre-certified or have requested 3 days or less for Situational Telework.

Open the Telework Case Approval Flow and add our changes

  1. Return to the App Home tab in App Engine Studio.
  1. Open the Telework Case Approval flow by clicking on the row under Logic and Automation.
  1. Toggle the Flow Designer view to Tree View.

  2. First, we want to add a Flow Variable to store the status of auto approval.

    1. Click the ... button next to the Save button on the top-left of your screen.
    1. Select "Flow Variables" from the drop-down.
  3. Click the plus sign ⨁ to add a variable.

  4. Set up the flow variable.

    Field NameField Value
    LabelApproved
    Nameapproved
    TypeTrue/False
    Click on the 🆇 button to close.

  5. Before our first step, we want to call the People Finder Spoke. Hover above the "Ask for Approval" step and click the plus sign ⨁.

  6. Add the People Finder Spoke

    1. Select "Action" as the step type.
    1. Search for "people finder".
    1. Select the "GET /user" action.
  7. Click the data pill picker for email.

  8. Dot-walk to the email address of the person that opened the request.

    1. Click "Trigger - Record Ceated"
    1. Click the blue arrow next to the "Telework Case" record to drill down.
    1. Click the blue arrow next to "Opened by".
    1. Click on "Email" to set the value.
  9. Click the Done button.

  10. Next, we want to use the decision table we built. Hover in-between steps 2 and 3 and click the plus sign ⨁.

  11. Add the Telework Auto Approval Decision Table.

    1. Select "Flow Logic" as the step type.
    1. Select "Make a decision" from the list.
  12. Setup the decision step.

    Field NameField Value
    Decision LabelCheck auto approve conditions
    Decision TableTelework Auto Approval
    ExecutionFirst decision that matches
    Use BranchesUn-check
    Telework RequestDrag and drop Telework Case Record data pill
    Click on the Done button.

  13. Now, we have to check if either auto-approve condition has been met. Hover in-between steps 3 and 4 and click the plus sign ⨁.

  14. Add the if condition.

    1. Select "Flow Logic" as the step type.
    1. Select "If" from the list.
  15. Setup the if condition.

    Field NameField Value
    Condition LabelIf auto approve conditions are met
    Condition 1Dot-walk (see step 18 below)
    Operatoris
    ValueY
    Click on the or button.
    Condition 2Dot-walk (see step 19 below)
    Operatoris
    ValueTrue
    Click on the Done button.

  16. Dot-walk Condition 1 (step 2 above)

    1. Click "2 - GET /User"
    1. Click the blue arrow next to the "output" object to drill down.
    1. Click on "telework-certified" to set the value.
  17. Dot-walk Condition 2 (step 2 above)

    1. Click "3 - Make A Decision"
    1. Click the blue arrow next to the "Decision Table Multiple Result Record" record to drill down.
    1. Click the blue arrow next to the "Result elements" glide_var to drill down.
    1. Click on "Auto Approved" to set the value.
  18. Let's set the Approved value to true.

    1. Select "Flow Logic" as the step type.
    1. Select "Set Flow Variables" from the list.
  19. To add a flow variable to set, click the plus sign ⨁.

  20. Set the Approved flow variable to true.

    1. Select "Approved | True/False" from the drop-down.
    1. Check the data box for true.
    1. Click the Done button.
  21. Now let's add the flow logic for when our condition is not met. Hover above step 6 and click the plus sign ⨁.

  22. Add the else condition.

    1. Select "Flow Logic" as the step type.
    1. Select "Else" from the list.
  23. Move the ask for approval action.

    1. Hover next to step 7 until you see and cross-shape and the text appears "Drag to reorder steps".
    1. Drag step 7 onto the plus sign ⨁ under step 6.
  24. Move the if condition for then manager approves.

    1. Hover next to step 8 until you see and cross-shape and the text appears "Drag to reorder steps".
    1. Drag step 8 onto the plus sign ⨁ under step 7.
  25. Now let's set the flow variable when the manager approves. Hover above step 9 and click the plus sign ⨁.

  26. Set the Approval flow variable to true.

    1. Select "Flow Logic" as the action type.
    1. Select "Set Flow Variables" from the list.
  27. To add a flow variable to set, click the plus sign ⨁.

  28. Set the Approved flow variable to true.

    1. Drag and drop the Approved flow variable from the data pills on the right side of the screen into the Name field.
    1. Check the data box for true.
    1. Click the Done button.
  29. Let's return to our mainline logic and add a new step.

  30. Add the if condition.

    1. Select "Flow Logic" as the step type.
    1. Select "If" from the list.
  31. Setup the if condition.

    Field NameField Value
    Condition LabelIf all approve conditions are met
    Condition 1Drag and drop Approved data pill
    Operatoris
    ValueTrue
    Click on the Done button.

  32. Delete the step placeholder under step 12.

  33. Move the Create Task step.

    1. Hover next to step 10 until you see and cross-shape and the text appears "Drag to reorder steps".
    1. Drag step 10 onto the plus sign ⨁ under the then condition in step 12.
  34. Move the Send Email step.

    1. Hover next to the new step 10 until you see and cross-shape and the text appears "Drag to reorder steps".
    1. Drag step 10 onto the plus sign ⨁ under the new step 12 (Create Task).
  35. Save the changes to the Main flow by clicking the Save button.

  36. Activate the Main flow by clicking the Activate button.

Bonus

Do you remeber hot to test your flow from the previous lab? Test your work using what you've learned!