download_business_background_report
Business purpose: pull a background report for the supplier’s business entity and archive it for underwriters to read. This is the simplest process — it stores raw results and scores nothing.
Step 1 — thomson_reuters/request_business_background_report
InitialTask, runs in the Web API.
Input |
|
Allowed sources |
|
Input validator |
yes (business name + required state) |
Output |
|
Side effects: save the row (pending) and start SWF with task_input = {correlation_id}.
Workflow id: Automatic UW Tool - {supplier_key} - Download business background report.
|
This is the only request task that does not touch |
Step 2 — thomson_reuters/handle_business_background_report_response
GenericTask + PurgableS3ObjectProducer. Input: {correlation_id}.
Flow
-
Reload the row and build the search payload from
background_business_search.xml(business_name,state). -
POST {THOMSON_REUTERS_API_URL}/v2/business/searchResults; readGroupCountfromns2:BusinessResults(0or missing →ResultNotFound) andUri(missing →MalformedResponse), thenGETthe search result. -
Read
ns3:BusinessResultsPage.ResultGroup.GroupId(missing →MalformedResponse). -
POST /v2/businessReport/reportResultswithbackground_business_report.xml, then poll the returnedUriuntilStatus.StatusCodeis no longer204. The details node is read asns10:BusinessReportDetailswith a fallback tons11:BusinessReportDetails. -
Archive the report to S3.
|
Unlike the other Thomson Reuters tasks this one addresses namespace-prefixed nodes literally
( |
Side effects
-
S3:
thomson_reuters/background_reports/supplier_key=<sk>/person_id=<pid>/business/<timestamp>.json. -
TaskExecutionTable→processed,output = {raw_result_s3_path},additional_data.full_result_s3_path. -
No
FinalStatusTable, noToolTable, no EventBridge event. -
Implements
purge(). -
On failure only the task row is marked
failed(no tool exists to flag). This task is also built without a logger, so its failures are visible through SWF and Sentry rather than application logs.