Wiki

Scale Your Enterprise

User Tools

Site Tools


bizweaver:wf_var

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
bizweaver:wf_var [2024/09/24 13:31]
dlee [Workflow Variables]
bizweaver:wf_var [2024/09/24 13:54] (current)
dlee [String Manipulation]
Line 12: Line 12:
   * Use drag & drop to place variable in your tool configuration.   * Use drag & drop to place variable in your tool configuration.
  
-{{ :bizweaver:wf_var01.png |}}+{{ :bizweaver:wf_var01.png?300 |}}
  
  
  
-======Introduction (Using Variables)====== 
  
-This page describes the use of variables in a Bizweaver workflow. 
  
-====== What are Bizweaver Variables? ======+===== Variables Tool =====
  
-**Variables** are data values held in memory during the execution of a workflow. There are two types of variables in Bizweaver: **User Variables** and **Step Variables**.+The **Variables** tool can establish constant/static values to be used in the following workflow steps.
  
-**“[[bw2:using_variables#User Variable Example|User Variables]]”** are defined by the userThese values can be defined in the Variables tool or they can be created using the **//[[bw2:vbscript_tool|VBScript]]//** tool.+{{ :bw2:bizweavervartool1.png?600 |}}
  
-**“[[bw2:using_variables#Step Variables|Step Variables]]”** are unique references created by the Bizweaver application. Most Bizweaver workflow tools make these variables as the step is executed. An example of this would be a reference to an output column from an SQLCommand: Reader step. 
- 
-Bizweaver variables are available to other workflow steps that follow the step where they are created. 
- 
-====== Variables Tool ====== 
- 
-The **Variables** tool can establish constant/static values to be used in the following workflow steps. 
- 
-{{ :bw2:bizweavervartool1.png |}} 
  
   * “Name” is the name of the variable.  This is how it is referenced in the workflow.   * “Name” is the name of the variable.  This is how it is referenced in the workflow.
   * "Value" is the actual value represented by a variable. Click on the gray area near the end of a row to open an editing window for the “Value” field.   * "Value" is the actual value represented by a variable. Click on the gray area near the end of a row to open an editing window for the “Value” field.
- +  * A variable cannot be deleted if it is used in any workflow.
-<WRAP center round tip 50%> +
-New in Bizweaver version 2.4 +
-</WRAP> +
- +
-  * Click on the **X** at the right-end of a row to delete a variable. +
-    * A variable cannot be deleted if it is used in any workflow.+
  
 Following are examples of using variables. Following are examples of using variables.
Line 53: Line 36:
   * The __value__ field is blank because the value to be used will be sent in the API call to Bizweaver.   * The __value__ field is blank because the value to be used will be sent in the API call to Bizweaver.
  
-{{ :bw2:bizweavervartool2.png |}}+{{ :bw2:bizweavervartool2.png?600 |}}
  
 The variable is then referenced in a subsequent SQL: Reader step. The variable is then referenced in a subsequent SQL: Reader step.
   * Any time a variable is referenced using <F4> in a SQL step, the string must be enclosed in single quotes as shown.   * Any time a variable is referenced using <F4> in a SQL step, the string must be enclosed in single quotes as shown.
  
-{{ :bw2:bizweavervartool3.png |}}+{{ :bw2:bizweavervartool3.png?600 |}}
  
 ====Example 2===== ====Example 2=====
Line 65: Line 48:
   * In this case, the __values__ are static.  They represent login information used to access the SAP HANA Service Layer API.   * In this case, the __values__ are static.  They represent login information used to access the SAP HANA Service Layer API.
  
-{{ :bw2:bizweavervartool4.png |}}+{{ :bw2:bizweavervartool4.png?600 |}}
  
 The variables are then referenced in a subsequent WebService2 tool step as shown. The variables are then referenced in a subsequent WebService2 tool step as shown.
  
-{{ :bw2:bizweavervartool5.png |}}+{{ :bw2:bizweavervartool5.png?600 |}}
  
-===== Calculations in Variables ===== 
  
-Arithmetic calculations can be applied to a numeric variable during workflow execution. This functionality is introduced in Bizweaver version 2.1.0.+====Example 3===== 
 +<WRAP center round tip 80%> 
 +Arithmetic calculations can be applied to a numeric variable during workflow execution. 
  
 A calculation using a variable is done by using the “EVAL{}” function in the “Value” of the variable. The calculation can be done against both user and step variables. The calculation is placed within the braces {} as shown in the examples. A calculation using a variable is done by using the “EVAL{}” function in the “Value” of the variable. The calculation can be done against both user and step variables. The calculation is placed within the braces {} as shown in the examples.
 +</WRAP>
  
-Everyday use of this functionality is to maintain a counter to control processing or document processing. The calculation will typically be placed inside of a loop construct. 
- 
-====Example 3===== 
 Following is a simple example of how a “counter” calculation is defined. We want to know how many records were passed into a loop from an SQLCommand step in this case. For this example, we will use a simple statement. Following is a simple example of how a “counter” calculation is defined. We want to know how many records were passed into a loop from an SQLCommand step in this case. For this example, we will use a simple statement.
  
Line 110: Line 92:
  
  
-====== Step Variables ======+===== Step Variables =====
  
 Step variables are created by Bizweaver and do not require any user action. These variables are available as soon as a step has been executed. Step variables are created by Bizweaver and do not require any user action. These variables are available as soon as a step has been executed.
Line 138: Line 120:
 When the file writer step sees the same step variable, the next record will be returned from the SQL select statement or C2 received from the loop processing. This cycle continues for each record read into the loop processing. When the file writer step sees the same step variable, the next record will be returned from the SQL select statement or C2 received from the loop processing. This cycle continues for each record read into the loop processing.
  
-====== Using Variables ====== 
  
-The following image illustrates how variables are selected. This process is used in all instances where some variable needs to be referenced. The list of available workflow steps will get larger as you progress through additional steps in the workflow. 
- 
-{{ :bw2:bizweavervarmanager1.png |}} 
- 
- 
-  - Position the cursor in the field where the variable is needed. 
-  - Press **F4** 
-      - The ‘Choose Variable” flyout is opened. 
-  - Workflow steps before the current one are listed in the right-hand panel. 
-      - Click on the appropriate step name. 
-  - Available variables for the selected step are expanded for the step in the right-hand panel. 
-      - Select the desired variable and double click. 
-<WRAP left round tip> 
-When variables are used, they have a particular name structure, as shown in the **//[[bw2:using_variables#Special Note for Step Variables and Loops|Using Variables with loops code snippet above]]//**. While it is possible to enter the variable name manually, this approach is not recommended. If this approach is taken, make sure that the variable's syntax is the same as it is in the step, including capitalization. 
- 
-</WRAP> 
- 
-====== Examples ====== 
- 
-Once a variable has been created, it can be used in any subsequent workflow step. 
- 
-===== User Variable Example ===== 
- 
-In a Bizweaver workflow, a user can reference variables initiated earlier in the workflow using the variables selector. In this example, a SQL statement is being used to pull information from the database. We want to limit the data based on a certain value. In this example, a value from the “Variables” step is used. 
- 
-When processed, the below workflow will only pull the CardType of "C," set in the "Variables_Init" step. 
- 
-{{ :bw2:bizweavervartool11.png |}} 
- 
-In the variables tool, there is a **User-Defined Variable ** of "UserVariable1." 
- 
-{{ :bw2:bizweavervartool12.png |}} 
- 
-In the SQL tool step, you can reference the **User-Defined Variable** of "UserVariable1" by pressing [F4] in the SQL tool, navigating to the left menu, and selecting the correct Variables option variable from the list of variables on the right menu. 
- 
-{{ :bw2:bizweavervarmanager2.png |}} 
- 
-So, the SQL statement now uses the value ‘C’ in the variable “UserVariable1.” 
- 
-{{ :bw2:bizweavervartool14.png |}} 
  
-Since the variable value ‘C’ is a string (text), the variable name must be enclosed in single quotes as required by SQL. 
  
-===== Step Variable Example =====+==== Example ====
  
 In this example, we are writing the output of the SQL step to a file. In this example, we are writing the output of the SQL step to a file.
Line 197: Line 137:
 Next, you will press [F4] and select the SQL step variables when going to the file writer step. Next, you will press [F4] and select the SQL step variables when going to the file writer step.
  
-{{ :bw2:bizweavervarmanager3.png |}}+{{ :bizweaver:wf_var02.png |}}
  
 You can see each step variable in the "Body" section of the FileWriter Tool. You can see each step variable in the "Body" section of the FileWriter Tool.
Line 206: Line 146:
 =====String Manipulation===== =====String Manipulation=====
  
-Starting in Bizweaver 2.7.2, the functionality to modify variables was introduced. This allows a user to manipulate all variables that are inserted in a specific step.+This allows a user to manipulate all variables that are inserted in a specific step and is accessed by pressing F4
  
-{{ :bw2:bizweavervarmanager1.png |}}+{{ :bizweaver:wf_var03.png |}}
  
   * **Escape:** Selecting this checkbox will enable or disable the escaping functionality.   * **Escape:** Selecting this checkbox will enable or disable the escaping functionality.
bizweaver/wf_var.1727199114.txt.gz · Last modified: 2024/09/24 13:31 by dlee