|
| Copyright © Cloud Software Group, Inc. All Rights Reserved |
If this activity is not part of a transaction group, the SQL statement is committed after the activity completes. If this activity is part of a transaction group, the SQL statement is committed or rolled back with the other JDBC activities in the group at the end of the transaction. See TIBCO ActiveMatrix BusinessWorks Process Design for more information about creating groups for transactions.
Path to the shared configuration resource containing the JDBC connection information. See JDBC Connection for more information about JDBC resources. The SQL SELECT statement to perform in the database. You can use a wizard to build the query for the desired database. See Query Designer for more information about using the Query Designer wizard. See Prepared Parameters for a description of this field.The ? replaces the value in the WHERE clause, and you can then provide input to the SQL statement from process data on the Input tab.
Keep in mind, ? is not valid SQL syntax, so checking the syntax of a query that contains question marks will return an invalid character error in the Query Designer wizard.You can optionally specify names for each prepared parameter. By default, the prepared parameters are named Prepared_Param_1, Prepared_Param_2, and so on.
For example, in the following schema, the NAME column can contain NULLs. If Use Nil is unchecked, the NAME element appears with a ? indicating it is optional (and if the column is NULL, the schema element is not included for that row). If Use Nil is checked, the NAME element is not optional, and it has two sub-elements, @nil and text(). The @nil element indicates whether the column value for the row is NULL, the text() element contains the column value when the column is not NULL. Note: Many databases treat empty strings and nulls as the same, so this field will not affect how the database interprets empty strings. Checking this field specifies that you would like to process the result set in smaller batches rather than processing the entire result set at once. When this field is checked, the subsetSize input element appears to allow you to specify the size of each batch of records you want to process. Also, the lastSubset output element appears and is set to true when the last batch of records is being processed.See Fetching Subsets of the Result Set for more information.
Specifies the time zone for the database server. See Time Zone Construction for more information about how time zones are constructed using this field.You can use the Constants tab in the XPath Formula Builder to supply a valid time zone name. The list of time zone names is generated from java.util.TimeZone.getAvailableIDs(). See Time Zone Names for the list of valid time zone names.
4. Set the subsetSize input item for the JDBC Query activity to the number of records you want to process for each execution of the loop. You could specify a constant, or you could use a global variable to store the value. Using a global variable has the advantage that you can change the value of the variable at deployment time. For example, create a global variable named BATCH_SIZE, then specify the chunkSize input element as $_globalVariables/pfx:GlobalVariables/BATCH_SIZE.
5. Select the JDBC Query activity and click the group icon on the toolbar to create a group containing the activity. See TIBCO ActiveMatrix BusinessWorks Process Design for more information about working with groups.
7. The loop should exit when the entire result set has been consumed. The output element lasSubset is a boolean that is set to true when the last subset of records is being processes. For example, the condition for the loop could be set to the following:
This is an optional element that appears only when the property java.property.bw.activity.output.stats.elapsedTime.JDBCQueryActivity is set to true in designer.tra. For run-time, set the property to true in the bwengine.tra file. By default, the property is set to false.You can turn off the property and not calculate the elapsed time at run-time by setting the property java.property.bw.activity.output.stats.elapsedTime.turnoff in the bwengine.tra file. However, note that setting this property will turn off the calculation of elapsed time at run-time for all the JDBC activities.The Error Output tab lists the possible exceptions that can be thrown by this activity. See TIBCO ActiveMatrix BusinessWorks Error Codes for more information about error codes and corrective action to take.
An invalid timezone was specified. See Time Zone Names for a list of valid timezones.
|
| Copyright © Cloud Software Group, Inc. All Rights Reserved |