15. Add the Claim Approval Task Steps

If the Total Amount value is greater than $100, the expense claim requires approval. In this section, you add the claim approval steps. First, you add a Task step, where you assign the approval task to a task recipient. You will configure the second conditional rule that once again, looks at the Total Amount value. This time, the business rule applies to the task recipient: the recipient can be one of two people, depending on the total claim amount. The recipients can choose from the following actions: Approved, Rejected, Rework. You will customize the task notification email, then add a reminder (or escalation). Reminders kick off when the task recipient has not responded to the task in the time allotted.

You will add a Decision step which generates the paths for the actions (Approved, Rejected, Rework). The final two claim approval steps update the Request Status property (SmartObject Method step) and sends an email to the original requester (Send Email step) in the event the task recipient rejects the claim. This completes the Rejected outcome. You will complete the Approved and Rework outcomes in the next few topics.

Note that the steps and images in this tutorial reflect a sample environment. If you are working in your own environment, your screen views will not match all the images provided. In addition, you will need to adjust some configurations to meet your own requirements, such as users and task recipients. Feel free to adjust configurations as you go to match your environment.

  1. From the Toolbox > Basic menu, add a Task step to the design canvas, then connect it to the Decision step > Claim GT $100 outcome. Move the starting point of the outcome to the bottom border so that the outcome is a straight line. This keeps your workflow tidy.
    1. Click the Toolbox icon to return to the main menus. Expand the Basic menu, then drag a Task step onto the design canvas, below the Decision step.
      Add Task Step
    2. If the claim amount is greater than $100, then the workflow routes to the Task steps you are now configuring. Connect the Claim GT $100 outcome to the new Task step. Move the starting point for the outcome to the bottom border by clicking the starting point handle and dragging it to the new location on the bottom border. This keeps the flow of the workflow neat and tidy.
      Connect Steps
  2. Begin the task configuration by entering INSTRUCTIONS for the task recipient. Use any text you like, for example, An expense claim requires your approval. Review the claim, then select Approved, Rejected, or Rework as your action decision. Click Submit to send your decision. Add three actions: Approved, Rejected, and Rework.
    1. Now, you are ready to configure the task. Select the Task step, then expand the Configuration Panel. In the Configuration Panel, make sure the TASK tab is active. (It's the first tab.) For the INSTRUCTIONS, enter
      An expense claim requires your approval. Review the claim, then select Approved, Rejected, or Rework as your action decision. Click Submit to send your decision.
    2. Next, you will add the actions (Approved, Rejected, and Rework) for the task recipient to choose from. Click the Add (+) icon under the ACTIONS heading. Delete the default entry and enter
      Approved
      then add another action. Change the value to
      Rejected
      then repeat this once more for the third action
      Rework.
      Actions
  3. Configure the form settings using the table below as a guide. If you need help, expand the "Show me how..." section.
    ScreenSettingNotes
    REFERENCESData sources discovered

    There are no changes on this screen.

    OPEN TASKHelp me configure it This option steps you through each setting.
    WORKFLOW VIEWCreate new State
    Claim Approval State
    Create a new state. Rename the state for clarity.
    OPEN TASK RULE ACTION Keep the default settings.
    AFTER SUBMIT ACTION Keep the default settings.
    SummarySave and finish the wizardThere are no changes to this screen.
    1. Now, you will configure the SmartForm you want for this task. The steps are very similar to the Start step form configuration. Click the FORM tab.
      where di
      Form Tab
    2. For the FORM TYPE, select SmartForm. For the FORM, browse to, then select Expense Claim Form. Click OK.
      Select Form
    3. The Open Task on a Form wizard launches.

    4. On the REFERENCES screen, there are no changes so click NEXT.
    5. On the OPEN TASK screen, select Help me configure it, then click NEXT.
    6. On the WORKFLOW VIEW screen, keep the option to Create a new State, then name the state
      Claim Approval State
      then click NEXT.
      Create a New State
    7. On the OPEN TASK RULE ACTION screen, there are no changes, so click NEXT.
    8. On the AFTER SUBMIT ACTION screen, there are no changes, so click NEXT.
    9. The final screen is the summary. Review the changes made on your behalf, then click SAVE AND FINISH. When you see the success check, click OK to exit the form wizard.
  4. Now, you will configure the conditional rule for the recipient. Once again, you want to analyze the Total Amount value. If the total amount is less than or equal to $500, then you can route this approval to the originator's manager. If the amount is greater than $500, the approval must come from Anthony, a member of the Finance staff.
    Begin by adding two RECIPIENTS: Originator's Manager and Anthony Petro.
    Assign your own user account or a co-worker’s account, so that you or they can action the task when testing the application.
    Then, configure a new RECIPIENTS RULE that states: If the Total Amount is less than or equal to 500, then assign the task to the Originator's Manager. If the Total Amount is greater than 500, then assign the task to Anthony Petro.
    Recipient's Rule
    1. Click the RECIPIENTS tab. First, you must add the recipients that you intend to use in the conditional rule. Under the RECIPIENTS heading, click Originator and select Originator Manager.
      Assign your own user account or a co-worker’s account, so that you or they can action the task when testing the application.
      Change Recipient
    2. Next, you will add a co-worker. Click the Add (+) icon. You see Originator added once again. Click the new Originator block, then select Browse... You are now on the Select User search screen. Enter the name of your co-worker into the search text box. Select the name when you see his name, then click OK.
      (Pick another user who can help you test the application)
      Search Recipients
      Claim Approval Task Recipients
    3. Next, you will set up the conditional rule that determines which recipient receives the task. Under the RECIPIENTS RULE heading, select the Certain Recipients, based on a rule option. Click the Edit Recipients Rule link.
      Edit Recipients Rule
    4. The rule designer opens. Click the Context Browser toggle to open the references. Expand the Expense Claim Header reference (if it is not already). Drag the Total Amount reference into the IF statement text box. Change the operator to Less Than or Equal, then enter
      500
      into the parameter text box.
      Recipients Rule
    5. Notice that the THEN and ELSE statements are empty. You need to select which recipient you want for which statement.
      Remove Recipient

    6. Click the Recipient Group block for the THEN statement and select Originator Manager (or, your own account if you added it). (It should be the default.)
      Originator Manager
    7. Repeat the step above for the ELSE statement and select your co-worker. (You will UNCHECK Originator Manager and CHECK the co-worker.)
      Recipient Rule
    8. Your conditional rule reads as follows: If the Total Amount is less than or equal to 500, then assign the task to the Originator's Manager. If the Total Amount is greater than 500, then assign the task to Anthony Petro. Collapse the Context Browser and the Recipients Rule designer.
  5. In this step, you will customize the task notification email that the task recipient receives. You will add references from the Context Browser to personalize the email subject line and body content.
    Customize the task notification email. Add references from the Context Browser to personalize the subject line and message body. Use the image below as a guide, if necessary.
    Task Notification Email
    1. By default, a task notification email is sent to task recipients. This email contains instructions on how to take action on the task as well as a link to open the task form (if there is a form). You can use references from the Context Browser to personalize the email.
      Click the EMAIL ALERT tab. Select the option to Customize Notification. For the SUBJECT line, enter
      An expense claim requires your approval: [Request Title]
      then replace the bracketed text with the Expense Claim Header > Request Title reference (from the Context Browser). In the message body, enter the following just below the Dear Participant line: 
      An expense claim requires your approval:
      Employee Name: [Employee Name]
      Total Amount: [Total Amount]
      then add the appropriate references from the Context Browser.
      Task Notification Email
  6. Now, you will configure a reminder for the task. (Reminders are also referred to as "escalations".) Reminders can be as simple as sending an email reminder, or more complex such as redirecting the task to another user. You can also use a combination of emails and task redirection. Configure a reminder for this task using the settings in the table below. If you need help, expand the "Show me how..." section.
    SettingValueNotes
    Email reminderSet the email reminder for five minutes and repeat it twice.
    Send the email to the task recipients and the originator.
    Customize the email subject line and message body.
    You want the reminder to fire after five minutes, then repeat itself two more times after that (in a real-world application, you would probably configure the reminders to wait for longer).
    Send the email to both task recipients and originator. The originator can follow up with the recipients to keep the workflow moving.
    Customize the reminder email. Enter any content you like for the subject line and the message body. Use references from the Context Browser to personalize the email.
    Task redirectRedirect this task after ten minutes.
    Redirect the task to a co-worker.
    Assign your own user account or a co-worker’s account, so that you or they can action the task when testing the application.
    After ten minutes, you want this task to redirect to another user. Of course, in the real world, the reminder process might take place over a week, or even two weeks.
    1. To apply a reminder to a task, begin by clicking the REMINDERS tab. You will add both an email reminder and task redirection. Begin with email reminder. Click the add an Email Reminder link.
      Add Email Reminder
    2. In the Task Recipient Email pane, keep the After option, then enter
      5
      in the Minutes text box. Click the Repetitions icon. Enter
      2
      in the Repetitions text box. This sets your reminder to send an email after five minutes, then repeat the email two more times after that.
      Configure Reminder Repetitions
    3. Next, you will edit the email message. Click the EDIT EMAIL link. (See image above for the location of this link.) The Email Reminder editor opens. Notice the default reminder recipients are the task participants. The reminder is automatically sent to the assigned task recipient(s). CHECK the option to Send email to workflow originator. This way, the originator can follow up with the task recipient if necessary. You also have the option of sending the reminder to another user, such as a manager.
      Reminder Email
    4. Now you will specify the subject line and message body for the reminder email. For the SUBJECT line, enter
      Reminder: Task Needs Action
      then for the BODY, enter
      This is a reminder email that you have a task past due. An expense claim submittal is waiting for approval. Please check your worklist tasks, then action this task.
      Employee Name: [Employee Name]
      Total Amount: [Total Amount]
      once again using references from the Context Browser to personalize the message.
      Reminder Email Content
    5. Close the email editor by clicking the toggle to the left of the Task Recipient Email title bar.
      Close Email Editor
    6. Last, you will redirect the reminder to another user if the task still remains active after the reminder emails. Click the Down Arrow (v) icon just below the repetitions box and select Add Redirect.
      Add Redirect
    7. Set the redirect for After ten minutes by entering
      10
      into the Minutes text box. Click the RECIPIENTS link.
      Add Redirect Recipient
    8. Click the Originator Manager block, then select Browse. In the search text box, enter your co-worker then select the name when you see his name. Click OK.
      Assign your own user account or a co-worker’s account, so that you or they can action the task when testing the application.
      Select Redirect Recipient
    9. Collapse the Redirect to Others screen.
      Collapse Screen
    10. Your final REMINDERS screen should look like the image below.
      Reminder Configuration

  7. Before moving on to the next step, change the step name to Claim Approval.
    1. Finally, you want to change the name of the step for clarity. Click the PROPERTIES tab. Change the Name to
      Claim Approval
      then collapse the Configuration Panel.
      Change Step Name
  8. From the ToolBox > Logic menu, add a Decision step and connect it to the Claim Approval step.
    1. The Decision step generates the outcomes for a Task step. You learned earlier that you can use the Decision step for applying conditional rules to the workflow. In this case, you are only using the Decision step to generate the outcomes.
      Expand the Toolbox > Logic menu. Drag a Decision step below the Claim Approval step. Connect the two steps. Notice the three outcomes reflect the actions you configured earlier.
      Decision Step Outcomes
  9. The final two sections in this topic complete the Rejected outcome steps. You will configure the Approved and Rework outcome steps in later topics. To complete the Rejected outcome, you will add a SmartObject Method step that updates the Request Status property, then add a Send Email step to notify the originator of the claim status.
    Copy, then paste, the Set Status Submitted step. Connect the new step to the Rejected outcome. Edit the configuration. Remove the Workflow ID INPUT MAPPING. Change the value of the Request Status to Claim Rejected. Change the step name to Set Status Rejected.
    1. To save time, you can copy and paste existing steps. Select the Set Status Submitted step, then select Copy from the Home menu.
      Copy Step
    2. Click on the design canvas (to deselect the Set Status Submitted step), then select Home > Paste.
      Paste Step
    3. Drag the new step so that it aligns with the Rejected outcome. Connect the Rejected outcome to the new step.
      Connect Steps
    4. Select the new step, then expand the Configuration Panel. Click the SMARTOBJECT tab so that it is active. Select the Workflow ID row under INPUT MAPPINGS, then click the Trash can to delete this setting. You don't need to save the Workflow ID again, once it's saved. Change the Request Status to
      Claim Rejected.
      Set Request Status
    5. Click the PROPERTIES tab and change the Name of the step to
      Set Status Rejected
      then collapse the Configuration Panel.
  10. From the Toolbox > Basic menu, add a Send Email step and bundle it with the Set Status Rejected step. Configure the email so that it notifies the Originator of the rejected decision. Change the step name to Email Originator Rejected.
    1. The last step in the Rejected outcome is a Send Email step that informs the expense claim requester of the rejected decision. Expand the Basic menu in the Toolbox. Drag a Send Email step and drop it on top of the Set Status Rejected step. In this case, you are bundling steps to save room on your design canvas. You can use the toggle to expand and collapse bundled steps.
      Add Send Email Step
    2. Select the Send Email step, the expand the Configuration Panel. Click the EMAIL tab so that it is active. Notice the default email recipient is Originator. This is correct, you want to sent the email to the expense claim requester. For the SUBJECT line, enter
      Expense Claim Rejected
      then for the BODY, enter
      The claim approver rejected your expense claim. Sorry!
      Send Email Configuration
    3. Click the PROPERTIES tab and name the step
      Email Originator Rejected
      then collapse the Configuration Panel.
      Rename Step
    4. Click the Save icon to save your progress
Review

In this section, you configured the steps for the claim approval path of the workflow. The following is a summary of the steps and features involved:

  • You added a Task step and configured three actions: Approved, Rejected and Rework.
  • You configured the task to use the Expense Claim Form and created a new State: Claim Approval State.
  • You configured a conditional rule that analyzes the claim amount, then assigns the task to a Recipient based on the amount.
  • You customized the task notification email with references from the Context Browser.
  • You added a reminder that first sends an email, then redirects the task to another user.
  • You copied another step in the workflow and reused it to update the Request Status.
  • You added a Send Email step and bundled it with another step to save room on your design canvas.

In the next step, you will complete the steps for the Rework outcome of the workflow.

Next Step: 16. Add the Originator Rework Task Step