Touchstone 11.0 API Reference
SubmitHazardAnalysis Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > HazardAnalysisServiceClient Class : SubmitHazardAnalysis Method
Contains a SubmitHazardAnalysisRequest that identifies the Hazard Analysis Options associated with the Hazard Analysis job that you want to run, along with the associated Business Unit SID and SQL Instance SID.

The HazardAnalysisOptions property contains a HazardAnalysisOptions object that enables you to specify whether to include a variety of hazard profiles in the Hazard Analysis job that you are requesting, among other properties. These hazard profiles include the following:

Note: You must specify at least one hazard profile of any type.

Submits a new Touchstone® Hazard Analysis job.

Touchstone Hazard Analyses enable you to identify the relevant hazards for the Locations in your exposure data. Underwriters use this information to assess a Location's exposure to a given peril. Touchstone's Hazard Diagnostics can calculate hazard information for your exposure data for the earthquake, tropical cyclone, flood, terrorism, and severe thunderstorm perils.

Syntax
Public Function SubmitHazardAnalysis( _
   ByVal request As SubmitHazardAnalysisRequest _
) As SubmitHazardAnalysisResponse
Dim instance As HazardAnalysisServiceClient
Dim request As SubmitHazardAnalysisRequest
Dim value As SubmitHazardAnalysisResponse
 
value = instance.SubmitHazardAnalysis(request)

Parameters

request
Contains a SubmitHazardAnalysisRequest that identifies the Hazard Analysis Options associated with the Hazard Analysis job that you want to run, along with the associated Business Unit SID and SQL Instance SID.

The HazardAnalysisOptions property contains a HazardAnalysisOptions object that enables you to specify whether to include a variety of hazard profiles in the Hazard Analysis job that you are requesting, among other properties. These hazard profiles include the following:

Note: You must specify at least one hazard profile of any type.

Return Value

A SubmitHazardAnalysisResponse containing the Activity SID that uniquely identifies the asynchronous web service call that you made to submit the specified Hazard Analysis job.
Remarks
To find the Business Unit SID to pass into this method, call the GetBusinessUnits() method.

To find the SQL Instance SID to pass into this method, call the GetSqlInstances() method.

For information about retrieving the results of a Touchstone Hazard Analysis, see the GetHazardAnalysisResults() method.

The results of a Hazard Analysis are stored in a Hazard Analysis Result object.

Example
The following example shows how to submit a Touchstone Hazard Analysis job using the SubmitHazardAnalysis() method:
using System;
using AIR.Services.Common.Data;
using AIR.Services.HazardAnalysis.Api;
using AIR.Services.HazardAnalysis.Data;
            
class SnippetSubmitHazardAnalysisRequest
{
    private static void SubmitHazardAnalysis(int businessUnitSid, int sqlInstanceSid, int projectSid, int exposureViewSid, int resultDSSid,
                                        string currency, int currencyExchangeRateSid, string analysisName, string analysisDesc)
    {
        HazardAnalysisServiceClient hazardClient = new HazardAnalysisServiceClient();
        SubmitHazardAnalysisRequest request = new SubmitHazardAnalysisRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
            
        HazardAnalysisOptions options = new HazardAnalysisOptions();
            
        options.ProjectSid = projectSid;
        options.ExposureTarget = new AIR.Services.AnalysisCommon.Data.ExposureTarget
        {
            Sid = exposureViewSid,
            Type = AIR.Services.AnalysisCommon.Data.ExposureTargetType.ExposureView
        };
            
        options.IncludeEarthquakeProfile = true;
            
        options.IncludeFloodProfile = true;
        options.FloodProfileOptions = new FloodProfileOptions()
        {
            IncludeFemaFloodZone = true,
            IncludeElevation = true
        };
            
        options.IncludeHurricaneProfile = true;
            
        options.IncludeExposureAttributeProfile = true;
        options.ExposureAttributeOptions = new ExposureAttributeOptions()
        {
            IncludeConstruction = true,
            IncludeOccupancy = true,
        };
            
        options.IncludeSevereThunderstormProfile = true;
        options.SevereThunderstormProfileOptions = new SevereThunderstormProfileOptions()
        {
            IncludeLossLevel100Year = true,
            IncludeWindStormFrequency = true
        };
            
        options.IncludeTerrorismProfile = true;
            
        options.Name = analysisName;
        options.Description = analysisDesc;
        options.ResultDataSourceSid = resultDSSid;
            
        options.Currency = currency;
        options.CurrencyExchangeRateSid = currencyExchangeRateSid;
            
        options.IncludeEventIntensityAnalysis = true;
            
        options.EventSetStandardName = "10K_US_AP_ST";
            
        options.IncludeCoastalFloodForEventIntensity = true;
        options.CoastalFloodEventIntensityOptions = new CoastalFloodEventIntensityOptions()
        {
            IncludeOnPlainFloodDepth = true
        };
            
        options.IncludeEarthquakeForEventIntensity = true;
        options.EarthquakeEventIntensityOptions = new EarthquakeEventIntensityOptions()
        {
            IncludePeakGroundAcceleration = true
        };
            
        options.IncludeInlandFloodForEventIntensity = true;
        options.InlandFloodEventIntensityOptions = new InlandFloodEventIntensityOptions()
        {
            IncludeOnPlainFloodDepth = true
        };
            
        options.IncludeHurricaneForEventIntensity = true;
        options.HurricaneEventIntensityOptions = new HurricaneEventIntensityOptions()
        {
            IncludeMaximumWindSpeed = true,
            IncludeStormSurgeDepth = true
        };
            
        request.HazardAnalysisOptions = options;
            
        SubmitHazardAnalysisResponse response = hazardClient.SubmitHazardAnalysis(request);
            
        if (response.Status.Code == StatusCode.Success)
        {
            Console.WriteLine("Hazard Analysis submitted with Activity sid: " + response.ActivitySid);
        }
    }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

HazardAnalysisServiceClient Class
HazardAnalysisServiceClient Members