Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Summary of Functions Used to Create and Execute Queries

All queries are created and executed using a set of query functions. The query functions are called from rule functions in the query agent.

Three functions are mandatory, and additional functions are available for different purposes.

## Create the Query

First a `Query.create()` function creates the query definition which contains the query text and a name for the definition.

## Create the Query Statement

Then the `Query.Statement.open()` function is used to create a query statement, which is a named instance of the query definition.

## Execute an Instance of the Query Statement and Obtain Results

Choose one of these ways to execute a query instance:

- For snapshot queries, you can use either the `Query.Statement.execute()` function or a `Query.Statement.executeWithCallback()` function.
- For continuous queries you must use the `Query.Statement.executeWithCallback()` function or `Query.Statement.executeWithBatchCallback()` function, with the `IsContinuous` parameter set to true.

  These functions are generally placed in an event preprocessor rule function.

## Use Results

To use results returned by a query, you can create events to send information between query and inference agents. You could also send results out to some other system. The use to which results are put depends on the business need.

See The Query Language Usage for more details.

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.