Touchstone Re 2023 API Reference
GetFileTemplates Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ActivityManagementServiceClient Class : GetFileTemplates Method
Contains a GetFileTemplatesRequest that identifies the software-generated Activity Sequential Identifier (SID) of the HPC Activity for which you want to retrieve a list of relevant file templates, along with the associated Business Unit SID and SQL Instance SID.

You can find the ActivitySid by looking at the response that the software returns for asynchronous web service calls, such as for the SubmitCreateDatabase() or SubmitDeleteProject() method.

Retrieves a list of Activity file templates that are relevant to a single High Performance Computing (HPC) Activity.

Activity file templates are files that contain headings under which data about a specified Activity is collected. All Activities produce an Operational Log. Other types of activities produce additional files based on other templates. For example, an Import Activity might produce files based on the following templates:

The Operational Log tracks the status of an Activity from start to finish. The Import Business Log tracks errors, exceptions, business errors, and other statistics related to an Import Activity. The rejection files contain records that the application cannot import due to errors. The user can fix these errors and import the corrected data into the software without reimporting all of the data again.

The template files do not contain the data itself; they contain the headings used to group the data when the software writes it to the Log or Rejection files.

Syntax
Public Function GetFileTemplates( _
   ByVal request As GetFileTemplatesRequest _
) As GetFileTemplatesResponse
Dim instance As ActivityManagementServiceClient
Dim request As GetFileTemplatesRequest
Dim value As GetFileTemplatesResponse
 
value = instance.GetFileTemplates(request)

Parameters

request
Contains a GetFileTemplatesRequest that identifies the software-generated Activity Sequential Identifier (SID) of the HPC Activity for which you want to retrieve a list of relevant file templates, along with the associated Business Unit SID and SQL Instance SID.

You can find the ActivitySid by looking at the response that the software returns for asynchronous web service calls, such as for the SubmitCreateDatabase() or SubmitDeleteProject() method.

Return Value

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.

Example
The following example shows how to retrieve a list of the Activity file templates that are relevant to an HPC Activity, using the GetFileTemplates() method:
using System;
using AIR.Services.ActivityManagement.Api;
using AIR.Services.Common.Data;
            
class SnippetGetActivityTemplates
{
    private static void GetActivityTemplates(int businessUnitSid, int sqlInstanceSid, int activitySid)
    {
        ActivityManagementServiceClient client = new ActivityManagementServiceClient();
        GetFileTemplatesRequest request = new GetFileTemplatesRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
        request.ActivitySid = activitySid;
        GetFileTemplatesResponse response = client.GetFileTemplates(request);
        if (response.Status.Code == StatusCode.Success)
        {
            foreach (string t in response.Templates)
            {
                Console.WriteLine("Template Name: " + t);
            }
        }
    }
}
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

ActivityManagementServiceClient Class
ActivityManagementServiceClient Members