Show TOC

Background documentationRunning a Function/Query Locate this document in the navigation structure

 

There are many possibilities once a connection to an EIS is established. The most common ones are running a function or launching a query, depending on what the specific connector supports.

Get Metadata (Optional)

Once there is a connection to an EIS, it is possible to obtain metadata on available functions and query objects.

For Functions:

From IConnection get IFunctionsMetadata, from which you get a list of functions, and can drill down for parameter information.

For Queries:

From IConnection get IObjectsMetadata and drill down for information about relations.

Execute
For Functions:
  1. IConnection.createInteractionEx() to get IInteraction.

  2. Iinteraction.getIInteractionSpec() to get InteractionSpec.

  3. With IInteractionSpec:

    1. Set name of function.

    2. Set input (if necessary).

      From IInteraction you can create an indexed or mapped record.

      IInteraction.getRecordFactory

      RecordFactory.createIndexedRecord or RecordFactory.createMappedRecord

    3. Iinteraction.execute(IinteractionSpec,Record)

For Queries:

The connector can have query execution capability. If the back end has a hierarchical object model and the connector supports execution by query string, you can do the following:

  1. From IConnection get INativeQuery.

  2. INativeQuery.execute(String queryString)

This would be typical if you are accessing an RDBMS using the JDBC Connector. However not all connectors to back ends that have a hierarchical object model support this type of execution, for example, the SAP System Connector. An alternative for the query string execution is:

  1. From IConnection get IExecution.

  2. IExecution.execute(IOperation operation)