- TIBCO BusinessEvents®
- CEP Query
- Query
- Util

# Query.Util.invokeFunctionInQuerySession()

## Signature

`Object invokeFunctionInQuerySession(String querySessionName, String queryRuleFunctionUri, Object[] parameters)`

## Domain

ACTION

## Description

Invokes a rule function in another query session/agent whose name is given along with the parameters.

## Parameters

Name | Type | Description
--- | --- | ---
`querySessionName` | `String` | A valid query session/agent name that has been deployed in the same processing unit.
`queryRuleFunctionUri` | `String` | parameters.
`parameters` | `Object[]` | Parameters to the rule function.

## Returns

Type | Description
--- | ---
`Object` | Result returned by the rule function. If a concept, event or a tree of concept and contained concepts are returned, then it should be noted that these instances from the query session do not affect the inference working memory. They are snapshot copies made by the query session. They cannot be asserted into or deleted from the inference agent. These objects can be de-referenced after the values have been read. By de-referencing them, the JVM Garbage Collector will clear these objects but their copies in the Distributed Cache will remain unaffected. Consistency may be enforced by acquiring appropriate locks.

## Cautions

none