Hi,
I run TickHistoryTimeAndSales on demand extractions using the .net API. My pattern is as follows:
- Validate instruments using context.InstrumentListOperations.ValidateIdentifiers()
- Send request using var job = context.ExtractRawStart(request)
- Persist the job to a database using job.ToString()
- In a separate process re-hydrate the job using var job = (IAsyncJob<RawExtractionResult>)AsyncJob<RawExtractionResult>.Parse(jobString);
- Monitor the job status using job = context.MonitorJob(job);
- Download the results
The problem I am facing is that sometimes identifiers pass validation and then may not return results due to permissions or some other reason. In this case at step 2, the job is returned with a Completed status. In this case the MonitorUri property is not set and the serialized job looks something like this:
ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.RawExtractionResult, ThomsonReuters.Dss.RestApi.Client, Version=12.1.509.0, Culture=neutral, PublicKeyToken=c1b530b4d66eacdd||Completed|100
The problem occurs in step 4 when i try to parse the job object from this string it fails with a FormatException complaining about the MonitorUri property.
The following job string deserializes fine:
ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.RawExtractionResult, ThomsonReuters.Dss.RestApi.Client, Version=12.1.509.0, Culture=neutral, PublicKeyToken=c1b530b4d66eacdd|https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractRawResult(ExtractionId='0x066eca4c0a102260')|InProgress|0