This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
bw2:decision_tool [2020/12/15 11:51] akoehler created |
bw2:decision_tool [2024/09/24 15:42] (current) dlee [Error Handeling & Decisions] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Introduction (Decisions) ====== | ||
| - | |||
| - | This page describes the use of the Bizweaver Decision tool | ||
| ====== Decision Tool ====== | ====== Decision Tool ====== | ||
| Line 9: | Line 6: | ||
| ====== Basic Configuration Steps ====== | ====== Basic Configuration Steps ====== | ||
| - | A Decision step can be added to a workflow at any time. Following is an example of a set of decisions might be constructed. | + | A Decision step can be added to a workflow at any time. Following is an example of a set of decisions |
| 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. | 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. | ||
| - | {{ :bw:image1.png | }} | + | {{ :bw2:bizweavedecision1.png |}} |
| - | 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. | + | Three values are included in the query: Partner Code and Partner Type. Our decision will be based on Partner Type, 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. | + | 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. | + | 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. | + | 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 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’. | + | In this first example, we will be branching to the SLQCommand step if the Card Type value = ‘C’. |
| - | - Drag the tool to be executed for the “true” decision step into the design area and configure it as needed. \\ {{ | + | - Drag the tool to be executed for the “true” decision step into the design area and configure it as needed. \\ {{ :bw2:bizweaverdecision2.png |}} |
| - | :bw:image2.png | }} | + | |
| - Drag a Decision tool into the design area. | - Drag a Decision tool into the design area. | ||
| - | - At this point you can either enter the evaluation rule or close the Decision. | + | - At this point, you can either enter the evaluation rule or close the Decision. |
| - | - In either case you will need to link the Decision to its preceding step. \\ {{:bw:image3.png}} | + | - In either case, you will need to link the Decision to its preceding step. \\ {{ :bw2:bizweaverdecision3.png |}} |
| - If the application has not already done so, connect the Decision to the appropriate output step. | - If the application has not already done so, connect the Decision to the appropriate output step. | ||
| - | - Open the Decision tool and configure the evaluation expression that will lead to the output step. \\ {{ | + | - Open the Decision tool and configure the evaluation expression that will lead to the output step. \\ {{ :bw2:bizweaverdecision4.png |}} \\ Be sure to pick the appropriate data Type for the value being evaluated. |
| - | :bw:image4.png }} \\ Be sure to pick the appropriate data Type for the value being evaluated. | + | |
| - Drag a “Merge” tool into the design area. | - Drag a “Merge” tool into the design area. | ||
| - Connect the Decision output step to the Merge tool. | - Connect the Decision output step to the Merge tool. | ||
| - | - Connect the Merge tool to the subsequent step in the workflow. \\ {{ :bw:image6.png? | + | - Connect the Merge tool to the subsequent step in the workflow. \\ {{ :bw2:bizweaverdecision5.png |}} |
| ===== Using the “Else” Decision Rule ===== | ===== Using the “Else” Decision Rule ===== | ||
| - | It is not necessary | + | It is unnecessary |
| - | 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. | + | 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. |
| - | {{ :bw:image7.png }} | + | {{ :bw2:bizweaverdecision6.png |}} |
| - | {{ :bw:image8.png }} | + | {{ :bw2:bizweaverdecision7.png |}} |
| ===== “No Match” Situations ===== | ===== “No Match” Situations ===== | ||
| - | 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 | + | You may also have situations where no action should be taken if none of the evaluation conditions are met. 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 goes to the End Decision step that ends the decision and continues processing. This is what is happening in the initial example discussed earlier. |
| ====== Multiple Evaluation Criteria ====== | ====== Multiple Evaluation Criteria ====== | ||
| - | 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 | + | 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 read a list of all the SAP Business One Business Partners. We then want to take any action if 1) a customer (CardType = ‘C’) and 2) their current A/R balance is greater or equal to 50,000. The evaluation will look like this: |
| - | {{ :bw:image9.png }} | + | {{ :bw2:bizweaverdecision8.png |}} |
| - **AND** and **OR** relationships are supported. | - **AND** and **OR** relationships are supported. | ||
| - Relationships can be defined using a combination of AND and OR. | - Relationships can be defined using a combination of AND and OR. | ||
| - | - When using a multiple AND relationships, | + | - When using multiple AND relationships, |
| - When using a combination of AND and OR relations, the OR relationships are considered together. | - When using a combination of AND and OR relations, the OR relationships are considered together. | ||
| - It may be necessary to try different combinations of AND and OR to obtain the desired result. | - It may be necessary to try different combinations of AND and OR to obtain the desired result. | ||
| + | ====== Decisions Variables ====== | ||
| + | |||
| + | ^ Name ^ Description | ||
| + | | StepMessage | ||
| + | | StepStatus | ||
| + | |||
| + | ====== Error Handeling & Decisions ====== | ||
| + | |||
| + | The information from error handling can also be used in Decisions. The two fundamental values are for “Step Status.” The values are True (no error) and False (error encountered). The only thing to remember is to define the values as Boolean rather than Alphanumeric in the decision expression. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | ---- | ||
| + | **[[bizweaver: | ||