QAS_EXECUTEQRYSYNCPOLL_OPER

This service operation runs the query request in the Process Scheduler. This service operation should be used for long running queries or queries with large result sets. The query is executed in batch mode through Integration Broker asynchronous servers (Pub/Sub) and the Process Schedulers.

When a client request for QAS_EXECUTEQRY_SYNCPOLL_OPER is received by the Integration Broker, the following occurs:

  1. An asynchronous one way service operation which gets processed by Integration Broker.

  2. The query instance ID (transaction ID) is returned to the requester.

    The requester can use the query instance to poll for the status (QAS_QUERYSTATUS_OPER) and to retrieve the query results (QAS_GETQUERYRESULTS_OPER).

  3. The service operation schedules the application engine program QASEXEQRY in the Process Scheduler.

The user ID in the request header must have permission to execute the QASEXEQRY application engine program, as well as permission for the service operation. The PeopleSoft delivered role QAS Admin grants the necessary permissions.

Note:

Pub/Sub and Process Scheduler must be running on the application server for the QAS_EXECUTEQRYSYNCPOLL_OPER service operations to be queued and processed.

When the execute query sync poll request is processed, it will validate the query fields and query prompts. If the client application sending the request caches the query definition, the client application can assume the query definition has not changed and it is not necessary to make calls to ListQueryFields and ListQueryPrompts. If the client application receives an error, such as incorrect field name or incorrect prompt value, then the client application should assume that the query definition has been updated. If the query definition has been updated, then the client application will need to make calls to ListQueryFields and ListQueryPrompts.

Request Message: QAS_EXEQRYSYNCPOLL_REQ_MSG

Element Name Description

QueryName

Required element unless you are using XML string

Query name.

isConnectedQuery

Required element

Indicate whether this is a connected query. Valid values are Y and N.

XMLString

XML string.

Note: See XML String.

OwnerType

Required element

Query owner type.

BlockSizeKB

Required element

If the output format is nonfile, indicate the block size to use for chunking the response. BlockSizeKB is a number of length 10 with a decimal position of 0. Block size is in bytes.

Note: The number of calls made to GetQueryResult reduces as the block size value increases. Thus, increasing performance.

See the Performance Consideration section in the Query Execution Models topic for additional information.

MaxRows

Required element

The maximum number of rows to be fetched

OutResultType

Required element

Select the output type. Valid values are:

  • WEBROWSET

  • XMLP

  • EXCEL

  • HTML

Note: For connected queries, the output type must be XMLP.

See Output Format and Output Type.

OutResultFormat

Required element

Select the output format. Valid values are:

  • FILE

  • NONFILE

Note: For connected queries, the output format must be FILE.

<Prompts> These elements are used for Connected Query or queries containing prompts.

Prompt Elements Description

PSQueryName

This field is used only for Connected Query. Enter the name of the query containing the prompt.

UniquePromptName

Unique prompt name defined in the query. This value is case-sensitive.

Use the service operation QAS_LISTQUERYPROMPTS_OPER to find the unique prompt name.

FieldValue

Field value for the prompt. This value is case-sensitive.

Note: Date fields require the date format as YYYY-MM-DD.

<FieldFilter> If you want to return only specific fields in the query, indicate each field you want returned.

FilterFieldName Element Description

FilterFieldName

List of field names to be returned. This value is case sensitive and must be the unique field name as returned by the service operation QAS_LISTQUERYFIELDS.

Example Request:

This request will execute the query XRFWIN with an output type of XMLP and output format of FILE.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:qas="http://xmlns.oracle.com/Enterprise/Tools/schemas/
QAS_EXEQRY_SYNCPOLL_REQ_MSG.VERSION_1"
xmlns:qas1="http://xmlns.oracle.com/Enterprise/Tools/schemas/
QAS_EXEQRY_SYNCPOLL_REQ.VERSION_1">
   <soapenv:Header/>
   <soapenv:Body>
      <qas:QAS_EXEQRY_SYNCPOLL_REQ_MSG>
         <!--Zero or more repetitions:-->
         <qas1:QAS_EXEQRY_SYNCPOLL_REQ>
            <QueryName>XRFWIN</QueryName>
            <isConnectedQuery>n</isConnectedQuery>
            <XMLString/> 
            <OwnerType>public</OwnerType>
            <BlockSizeKB></BlockSizeKB>
            <MaxRow>3</MaxRow>
            <OutResultType>XMLP</OutResultType>
            <OutResultFormat>FILE</OutResultFormat>
        </qas1:QAS_EXEQRY_SYNCPOLL_REQ>
      </qas:QAS_EXEQRY_SYNCPOLL_REQ_MSG>
   </soapenv:Body>
</soapenv:Envelope>

Response Message: QAS_EXEQRYSYNCPOLL_RESP_MSG

Element Name Description

QueryInstance

Query instance ID.

This instance ID is used for GetQueryStatus, CancelQuery, and GetQueryResult.

Example Response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <QAS_EXEQRYSYNCPOLL_RESP_MSG xmlns="http://xmlns.oracle.com/
      Enterprise/Tools/schemas/QAS_EXEQRYSYNCPOLL_RESP_MSG.VERSION_1">
         <QAS_EXEQRYSYNCPOLL_RESP>
            <PTQASWRK class="R" xmlns="http://xmlns.oracle.com/
            Enterprise/Tools/schemas/QAS_EXEQRYSYNCPOLL_RESP.VERSION_1">
               <QueryInstance>8995a01e-0a75-11dd-9c24-98a15db6aa18</QueryInstance>
            </PTQASWRK>
         </QAS_EXEQRYSYNCPOLL_RESP>
      </QAS_EXEQRYSYNCPOLL_RESP_MSG>
   </soapenv:Body>
</soapenv:Envelope>