Asynchronous Actions
By default, the IDOL Content component processes all actions synchronously. In this case, Content does not respond to the action until it has completed the request. The result of the action is in the response to the request.
With additional configuration, you can also process query actions asynchronously. In this case, Content responds to the action immediately. The request is added to a queue of actions. The response to the request contains a token. You can use this token to determine whether the request has finished, and obtain the results of the action. To do this, use the QueueInfo action.
You might want to use asynchronous actions to run operations that take a long time, and that do not require an immediate response. For example, you might have synchronous queries to return results to users, and then use an asynchronous action to run a query summary.
Configure Asynchronous Actions
You must configure the IDOL Content component to allow asynchronous actions.
-
Open the IDOL Content component configuration file in a text editor.
-
Create an
[Actions]
configuration section. -
In the
[Actions]
section, add the Async parameter, and set it toAsyncActions
. -
Create an
[AsyncActions]
section. -
In the
[AsyncActions]
section, set the Threads parameter to the number of threads that you want to use for asynchronous actions. -
Save and close the configuration file.
-
Restart the IDOL Content component for your changes to take effect.
For example:
[Actions] Async=AsyncActions [AsyncActions] Threads=2
Send Asynchronous Actions
To send an asynchronous action, you use the same action syntax as normal, but add the Synchronous
parameter, set to False
.
You can send the following actions asynchronously:
DetectLanguage | GetTagValues | Summarize |
DocumentStats | Highlight | TermExpand |
GetAllRefs | List | TermGetAll |
GetContent | Query | TermGetBest |
GetQueryTagValues | Suggest | TermGetInfo |
GetTagNames | SuggestOnText |
Retrieve Results for Asynchronous Actions
The QueueInfo action allows you to retrieve the status and results of asynchronous actions.
To return the results of all asynchronous actions, send a QueueInfo
action, with the QueueName parameter set to Async
, and the QueueAction parameter set to GetStatus
. You can set the Token parameter to the token for a specific action to retrieve results for only that action.
NOTE: If you do not specify the Token
parameter, all results for the server return. OpenText does not recommend that you return all results for a server that has been running for a long time, because the response might time out.
NOTE: There are no user restrictions for viewing the queue list, so all users can see all results that the original action returns. OpenText does not recommend that you use asynchronous actions if you have strict document security requirements.
TIP: You can use the QueueInfo
action to return information about the queue, and to cancel or change the priority of actions. For more information,
You can use the Asynchronous Queues page in the Monitor section of IDOL Admin to view details of the asynchronous actions that the server is processing, view the results of those actions, and cancel actions. For more information, refer to the IDOL Admin User Guide.