frevvo Latest - This documentation is for frevvo v10.0. Not for you? Earlier documentation is available too.
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.
You can add a precondition directly from your workflow diagram.
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.
If you have an existing precondition that was manually entered into the Precondition Code field when the Builder was turned off (code mode), slide the
To remove an existing precondition step, click the Action Menu and select Delete.
You must enter valid precondition logic to enable the Submit button (when adding the precondition) or navigate away from the Precondition Step when it is selected. If you see this error message, please double check that you have entered valid precondition logic.
Make sure the controls used in preconditions are required controls. Controls without values used in preconditions will cause an error in the workflow. Test for this when you are creating workflows with preconditions to ensure that when the workflow designer shares the workflow with others that it will not display an error.
Imagine a mortgage project in which a Supervisor had to perform a step for all mortgages over $500,000.00. The applicant performs Step 1, and enters the loan amount into a field named LoanAmount. Step 2 is performed by a bank Employee and Step 3 is performed by the Supervisor only for mortgages over 500k.
To do this, use the Precondition Builder or drop in the code to add the precondition before Step 3.
You can also set preconditions based on values in dropdowns and radios. For example, imagine Step 2 contained a dropdown control named SendToSupervisor with the values Yes/No. The Employee could override the logic in the workflow to send for Supervisor approval even for loan amounts under 500,000.00. Add the following precondition before Step 3 (Supervisor Approval).
The Supervisor step would be skipped for loans less then 500,000.00 or if the Employee set Send To Supervisor to 'no'.
In this example if the Supervisor was the one to fill the first step of the workflow then they were required to enter their Supervisor Title, and that field is thus guaranteed to have a value. In this case, to skip the next step and go directly to the Supervision step, add this code - SupervisorTitle.value != '' " to the second step's precondition or use the builder to create a precondition where the second step only executes if the Supervisor Title filed is empty. Then add another OR statement to the precondition on the Supervisor step to execute that step if the Supervisor Title is filled.
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 frevvo 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 frevvo submission repository with some customized indication that the workflow step was rejected. See the Reject to Discard topic for the details and an example.