Daily Process
Input Parameter | Details |
q=load |
Setting the “q” flag (short for query) to “load” tells DailyProcess.ashx that we are loading data. |
e=org.env.level | The “e” flag specifies the exact workflow environment. An environment has three components. For example “ABCBank.xVA.Production” means: Organisation=ABCBank Environment=xVA Level=Production |
d=date (yyyy-MM-dd) | This is the calculation date for the workflow. An environment contains workflows for multiple dates and this flag selects the correct one. Note: This flag is optional for Vector Risk load files because the system will extract the date from the second row in the load file if it is not supplied. |
datafile=@name | This parameter is a string containing the load data. The @ in front of it tells the system that it is actually a file being sent. The system will save the file into a temporary location on the server. Typically the csv format is the easiest to map to. The system will convert the file from csv into Vector Risk objects on loading into the system. Once loaded, the data can be viewed in the GUI in an xml tree format, and can be exported by the user in either xml or csv format. Note: When loading csv data the command includes the parameter: type=text/csv. If loading xml data, the command would instead use: type=text/xml. |
Input Parameter | Details |
Soap Header | The body of the soap envelope contains a GetStatus object with three input parameters: environment, date and statusToGet. Eg: In the example below: • environment should be configured as org.env.level • date should have the format yyyy-MM-dd. • statusToGet = all <soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:web='http://boundaryrider.com.au/webservices/'> <soapenv:Header/> <soapenv:Body> <web:GetStatus> <web:environmentName>$environment</web:environmentName> <web:environmentDate>$date</web:environmentDate> <web:statusToGet>all</web:statusToGet> </web:GetStatus> </soapenv:Body> </soapenv:Envelope> |
Soap call | The soap call specifies: • soap_url • userpass (username and password separated by “:”) • Content-Type = text/xml • charset = utf-8 • soapaction (GetStatus) • soapheader (above) Curl example: curl.exe -s ` "https://workflow.ch.vectorrisk.com/DailyProcess.asmx" ` -u $userpass ` -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: http://boundaryrider.com.au/webservices/GetStatus' ` -d $soapheader |
Response object | The response is a list of objects (one per task) containing details of each task in the workflow. We are generally most interested in the “Status” field. The Status may be one of the following: • Pending • InProgress • Success • Failure • Locked A typical use case would be to poll the web service in a loop (sleeping for some seconds between each poll) until a particular task (most often a publish task) is successful. This loop can also check the status of other tasks and create an alert if any of the tasks have a status of “Failure” as this means something has gone wrong with the run and intervention (or re-run) is required. Note: When a re-run is initiated by reloading data to the workflow, all of the calculation and publish tasks statuses are reset to “Pending” so the GetStatus loop can start polling all over again. |
Input Parameter | Details |
Soap Header |
The body of the soap envelope contains a GetZipReportUrl object with three input parameters: environment, date and taskName. Eg: In the example below: • environment should be configured as org.env.level • date should have the format yyyy-MM-dd. • taskName = Publish <soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:web='http://boundaryrider.com.au/webservices/'> <soapenv:Header/> <soapenv:Body> <web:GetZipReportUrl> <web:environmentName>$environment</web:environmentName> <web:environmentDate>$date</web:environmentDate> <web:taskName>Publish</web:taskName> </web:GetZipReportUrl> </soapenv:Body> </soapenv:Envelope> |
Soap call | The soap call specifies: • soap_url • userpass (username and password separated by “:”) • Content-Type = text/xml • charset = utf-8 • soapaction (GetZipReportUrl) • soapheader (above) Curl example: curl.exe -s ` "https://workflow.ch.vectorrisk.com/DailyProcess.asmx" ` -u $userpass ` -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: http://boundaryrider.com.au/webservices/GetZipReportUrl ' ` -d $soapheader |
Response object | The response is a string containing the URL giving temporary access to the zip file on Azure blob storage containing the reports. |
Function | HTTP Post Command |
Create a daily folder |
This command is normally not necessary, as simply calling a load task against a new date will trigger the system to generate an environment for that date. curl.exe -s -w "%{http_code}" -u $userpass -d "environmentDate=$date&environmentName=$environment" -H "Content-Type: application/x-www-form-urlencoded" -X POST $soap_url/CheckAndCreateDailyFolder |
Set task status |
This command would be used to set a task to “Locked” so it will not run, or “Pending” which makes the task respond to a command to run it. It can also be used to set load tasks to pending so a user can make a fresh start on an environment. curl.exe -s -w "%{http_code}" -u $userpass -d "environmentDate=$date&environmentName=$environment &taskName=LoadTrades&taskStatus=Pending&optionalLogMessage=" -H "Content-Type: application/x-www-form-urlencoded" -X POST $soap_url/SetTaskStatus |
Execute task |
This command can be used to trigger a re-run of a task that is in a “Pending”, “Success”, “Failure”, or “InProgress” state. Note: this command will not trigger a re-run of a task in a “Locked” state. curl.exe -s -w "%{http_code}" -u $userpass -d "environmentDate=$date&environmentName=$environment &name=ReconcileTrades" -H "Content-Type: application/x-www-form-urlencoded" -X POST $soap_url/ExecuteTask |