Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel2

Preconditions add logic to your workflow to conditionally perform or skip steps based on the data entered into prior workflow steps. They are also used to generate/not generate mapped PDFs. The precondition logic is the same used when writing business rules. A step with a precondition will be performed when the precondition evaluates to true and skipped if it evaluates to false.

Add a Precondition

You can add a precondition directly from your workflow diagram.

  1. Click theImage Modifiedicon where you would like to add the precondition.
    Image Modified
  2. Select Add precondition.
    Image Modified
  3. Configure the precondition. 
    1. Provide a Precondition Description, which displays in the workflow diagram. This field is limited to 255 characters, and it is optional. If the description is empty, the Precondition logic is described i.e. "LoanAmount is equal to or more than 50000". 
    2. Add the precondition logic. You must enter a valid precondition in order to click Submit. 
      Image Modified

Your precondition will appear in the workflow diagram as a yellow box with Yes and No arrows to illustrate how the workflow will route based on the precondition results. Click that yellow box to edit it.

...

There are two entry modes for preconditions: Precondition Builder mode and code entry mode. Precondition builder mode is turned on by default. The designer can switch back and forth between the two modes. The Precondition Builder makes it very easy to eliminate incorrect or invalid JavaScript in your precondition statements during the design phase. Use the Precondition Builder to:

...

  1. Slide the Precondition Builder toggle to the left to turn off the Builder. Be aware that taking this action will remove your ability to edit using the Precondition Builder. A warning message will display:
    1. Click the CLEAR PRECONDITION button to remove any existing Precondition logic, if needed.
  2. Type the JavaScript into the field.
    1. Changes to the precondition trigger code validation. Appropriate messages are displayed if errors are encountered. Errors with information display if the JavaScript is invalid.
    2. It is important that designers test the preconditions in your workflow. The Precondition Builder displays an error if it encounters invalid JavaScript, however, runtime errors such as leaving off the .value are not flagged by the Precondition Builder because the JavaScript is valid. For example, the precondition in the image is missing the .value for the Loan Amount field. This precondition will pass the Precondition Rule Builder validation but it will not work. frevvo will catch this error when the workflow navigates to Step 2. To correct the runtime behavior, change the precondition to LoanAmount.value >=500000
Warning

Preconditions only support value-based conditions. Even though "is valid" and "is invalid" are options in the Precondition Builder, these will not work and will cause an error. Future versions of frevvo will remove these options and also enforce value-based conditions only in the javascript editor.

Update Business Rules

If you have rules that operate on the step that may be skipped due to your precondition, such as show/hide a signed section, you must update the business rule to add the same condition you used in your precondition logic. 

...