EagleML API Client - Asynchronous Mode
This mode requires November 2016 EagleML Release or newer.
Overview
Asynchronous mode uses callback - you might need to change your firewall configuration to let it work properly.
To enable asynchronous mode enter in the console:
-execution=async
To launch a single extract you can determine all necessary parameters directly in console with the "-data=" option, for example:
-data="basecorrid|businesstaskid|TaskParam;TaskValue;TaskParam;TaskValue"
When you want to launch several extracts or just want to read all parameters from a file, use the "-file=" option:
-file="C:\Users\User\Documents\my_config.txt"
Read more about formatting such files
Step-by-Step Process Description
In asynchronous mode the client works like this:
If several -threads are set, separate callbacks with different ports, separate RunTastRequests and separate WS adapters described below will be generated for each of them
First of all, a callback is created. It is represented by a Jetty HTTP Servlet server which starts to listen on a random free port. You can set a timeout here, when it expires, the callback will be unregistered and the timeout error will be displayed. For example, a 5 min t/o:
-timeout=300
The client then generates a RunTastRequest for extract and sends it to server. The RTR will contain ReplyTo element with the IP address of the Eagle API client, the communication port and /eagleapicallback suffix, for example:
<replyTo>http://99.99.99.999:63345/eagleapicallback</replyTo>
When the server receives a RunTastRequest with ReplyTo element with /eagleapicallback in it, it sends the TaskAcknowledged (ACK) message back to the client, performs the extract, archives it, then creates a WS adapter and tries to send a multipart message consisting of the TaskStatusResponse and the extract.
The client receives the ACK and starts to await incoming multiparts (TSR+data):
On multipart arrival it switched off the callback (the port is free now) and:
Parses the TaskStatusResponse to understand if its task status is SUCCESS, FAILED or NO_DATA.
If the status is SUCCESS, extracted data will be uploaded as an archive file and saved in the temporary folder with correlation id as its name. (temporary folder is the system %TEMP%, e.g., _C:\Users\admin\AppData\Local\Temp_ - this folder is not purged automatically)
If a folder is specified in the "resultsdir" parameter, the extract data will be unzipped and stored in this particular folder.
If "resultsdir" is not specified or empty, the extract remains unzipped in the temp folder.
​If the status is FAILED or NO_DATA, error description will be displayed.
If the multipart does not arrive before the -timeout expires, the callback will be unregistered and the timeout error will be displayed.