If you have a comment on this topic, contact Aptify Documentation. If you want to return to the Aptify Community Site, please click here.

Using Process Flows to Add Functionality and Conditional Paging Logic

The Wizard infrastructure supports the ability to fire a process flow based on a user's interaction with the buttons at the bottom of the wizard. Each wizard page can be linked to one or more process flows on the Pages record's Process Flows tab.

A wizard designer can specify that a process flow should execute based on one of the following events:

  • Before Next: Fire the specified process flow after the user clicks the Next button but before proceeding to the next page.
  • After Next: Fire the specified process flow after the user clicks the Next button and after proceeding to the next page.
  • Before Back: Fire the specified process flow after the user clicks the Back button but before proceeding to the previous page.
  • After Back: Fire the specified process flow after the user clicks the Back button and after proceeding to the previous page.
  • Before Finish: Fire the specified process flow after the user clicks the Finish button but before completing the wizard.
  • After Finish: Fire the specified process flow after the user clicks the Finish button and after completing the wizard.
  • Before Cancel: Fire the specified process flow after the user clicks the Cancel button but before canceling the wizard.
  • After Cancel: Fire the specified process flow after the user clicks the Finish button and after cancelling the wizard.

One of the primary uses for this functionality is to enable conditional logic to move between pages in a non-linear fashion. For example, in the sample Opportunity Knocks wizard described above, a user may not have Line Items to enter for a new opportunity. In this case, the user experience could be improved by first asking the user if he or she has Line Items to enter. If the user clicks Yes, then the wizard should display the Line Items page; if the user clicks No, then the wizard should skip the Line Items page (step 3) and proceed directly to Step 4.

Follow these steps to link a process flow to a trigger event within the wizard:

  1. Open the Wizard Pages record to which you want to attach a Process Flow.
    • For the Line Items conditional logic described in this section, the designer would attach the process flow to Page 2 (code B) so that it fires before proceeding to Page 3, the Line Items page.
       
  2. Click the Process Flows tab.
  3. Open an new Process Flows record.
  4. Select the event Type from the drop-down list.
    • In the example below, the selected Type is Before Next, since the designer wants to display the "Do you want to enter Line Items?" message box before proceeding to the next step.
  5. Specify the Process Flow to fire when the trigger event (specified in the Type field) occurs.  

    Attaching a Process Flow to a Page
    • See How to Create a Process Pipeline for general information on how to create Process Flows in Aptify. The information below provides information that is specific to creating a process flow for wizard pages.
    • Process Flows attached to a wizard page typically use one or more input properties that are passed in from the wizard. Note that you should name the input properties exactly as shown below (they are case sensitive).
      • GEObject: This object stores all of the user inputs within the wizard up until the time the process flow executed.
      • Result: This object specifies the wizard's current position within the pages.
      • SelectedItems: If the wizard is launched from a list view, this property passes in the IDs of the records selected in the source view (or all records in the view if none are selected). This property is used by wizards that operate on a set of records passed in from a view, such as the Account Manager Transfer wizard and the Bulk Write-Off wizard. Review the configuration for those wizards within Aptify for examples of how this property is used by a metadata wizard.
         
    • To control the wizard's action following the execution of the process flow, the process should include one or more steps that use the Set Wizard Result component. This component provides instructions to the wizard for how it should proceed. The standard result options include continue to a specified page, finish the wizard, cancel the wizard, display an internal error message, make no change to the default paging logic, and open the wizard's on-line Help window.
      • When passing in the ResultObject to a Set Wizard Result step, you must enter the Context Object that is named exactly as Result.
      • See the Test Process Flow that is included with Aptify as part of the Sample New Company wizard for an example.
      • The figure below illustrates a Prompt for Line Items process flow that fires based on the Before Next trigger when a user clicks Next on Page 2 of the Opportunity Knocks wizard. The first step of this Process Flow is a Message Box that asks the user if there are line items to enter. If the user selects Yes, the process flow proceeds to the Show Line Items Page step that instructs the wizard to proceed to page C (that is, the selected Result is Continue to Specified Page and the GoToPageCode is set to C).

        Sample Wizard Page Process Flow
  6. Click OK to save and close the Process Flows record.
  7. Click OK to save and close the Pages record.
  8. Save the Wizards record.

Copyright © 2014-2019 Aptify - Confidential and Proprietary