ExpressionService.beginBatch

Syntax

beginBatch(bIgnoreError: Boolean);

Parameters

bIgnoreError. Indicates if batch queries are processed independently. If the parameter is set to True, batch queries are processed independently.

Description

The beginBatch method enables batch mode of sending queries.

Comments

Batch mode of sending queries is disabled by the endBatch method.

Example

To execute the example, the HTML page must contain the TransformDialog component named dialog (see Example of Creating the TransformDialog Component). Get a service of expressions and check if batch mode of sending queries is enabled, and if not, enable it:

// Get service of expressions
PP.Object.defineProps(PP.Ufe.Ui.TransformDialog, 'ExpService', True);
var expService = dialog.getExpService();
// Check if batch mode of sending queries is enabled
if (expService.getIsBatchMode()) {
    console.log("Batch mode of sending queries is enabled");
} else {
    console.log("Batch mode of sending queries is not enabled");
    expService.beginBatch();
}

The console displays a message if batch mode of sending queries is enabled:

Batch mode of sending queries is not enabled

 

Manually expand tree elements in the left panel of the dialog box. Elements are expanded but are empty:

Disable batch mode of sending queries:

// Disable batch mode of sending queries
expService.endBatch();

After disabling batch mode of sending queries a query is sent to the server, and the contents of the expanded elements is loaded:

See also:

ExpressionService