Versions Compared

Key

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

Table of Contents

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.

Image RemovedImage Added

Edit the Precondition

...

  1. The Precondition Builder is turned on by default. Launch the Builder by clicking in the Precondition logic box or clicking the Edit button.
    1. Click the CLEAR PRECONDITION button to remove any existing Precondition logic, if needed.
  2. This editor uses a modified version of the frevvo Visual Rule Builder where you can build your precondition statement by selecting controls and conditions from the dropdown lists. Note the field drop downs (left and right sides) will not contain any repeating type fields (tables/repeats).
  3. Create the Precondition by selecting fields from your workflow, an operation and a value. To enter a literal value, slide the toggle to the right. Yo can add more than one condition by clicking on the Add Condition button and modify the logic expression, if necessary.
  4. Click OK to save the precondition or click CANCEL to discard. You will be prompted to confirm the cancellation.

...

  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. will frevvo will catch this error when the workflow navigates to Step 2. To correct the runtime behavior, change the precondition to LoanAmount.value >=500000

...

Preconditions can be used to implement a Reject to Discard scenario as an option for rejecting workflow tasks. Let's say you want to note that a workflow task is rejected (not approved) but still have the form stored as a completed submission in the repositoryfrevvo repository. Adding preconditions that evaluate to true to later workflow steps will cause those subsequent steps to be skipped and the workflow will complete. The workflow will be saved in the submission frevvo submission repository with some customized indication that the workflow step was rejected. See the Reject to Discard RejecttoDiscard topic for the details and an example.