This is an old revision of the document!
This document describes the use of the Bizweaver Decision tool
This document is intended for developers of Bizweaver workflows.
The following documents contain additional information that may be helpful with the development of Bizweaver workflows.
The Bizweaver Decision tool provides the ability to do “branching” within a workflow based on values found in previous workflow steps. The test condition can be very simple, based on a single value, or more complicated using AND/OR conditions for a single test.
A Decision step can be added to a workflow at any time. Following is an example of a set of decisions might be constructed.
The initial workflow is very simple. A SQLCommand query step retrieves a list of Business Partners from the SAP Business One database. The decision(s) are within a loop since we want to evaluate each record individually.
Three values are included in the query: Partner Code and Partner Type. Our decision will be based on Partner Type, which can be one of three values: C, S, or L.
We will begin by adding a single decision. If the Partner Type = ‘C’ we will take one path. Otherwise we will take a different path.
For simplicity in this illustration the only action taken for the next step will be to execute another SQLCommand query to obtain the Business Partner’s name from the database.
It should be noted here that adding the step that will be executed based on the decision makes the setup process somewhat easier. The actual step depends on if you are checking for a “True” or “False” decision. This approach is used here but it is not mandatory.
In this first example we will be branching to the SLQCommand step if the Card Type value = ‘C’.

It is not necessary to add an explicit ELSE evaluation in the decision for situations where you have a single evaluation and that evaluation is false. The application will simply proceed to the next step that is not associated with the true evaluation. In the example above, a false evaluation will go directly to the “Merge1” step.
However, if you want a false evaluation to go to a specific step, an ELSE evaluation must be used. In this next example we want the flow to move to the “SQLCommand_getOtherName” step. Therefore, we have an explicit ELSE step to point the workflow in that direction.
You may also have situations where, if none of the evaluation conditions are met, no action should be taken. Nothing needs to be done in this case. If none of the evaluation conditions are met, and an ELSE path is not found, the workflow simply goes to the End Decision step that ends the decision and continues processing. This is what is happening in the initial example discussed earlier.
The previous examples illustrate a single evaluation criterion. In some cases, however, the evaluation may need to be more complex. In the following (simple) example we are reading a list of all the SAP Business One Business Partners. We then want to take an action if 1) it is a customer (CardType = ‘C’) and 2) their current A/R balance is greater or equal to 50,000. The evaluation will look like this: