GetServiceInstance<>

The GetServiceInstance activity retrieves an instance of a service from the service locator and provides the capability to execute service operations within the Anthology Student service suite.

The services and methods are documented in the Object Library. The Object Library is provided in compiled HTML (CHM) format and can be downloaded locally. Log on to https://www.mycampusinsight.com/Documentation-Center/Help/Help_Home/Content/helphome.htm and select APIs > Object LibraryCommand Model and Query Model.

The following operations invoked using the GetServiceInstance activity have gone through additional testing and have been proved out for use from Workflow Composer, but all methods are called internally by the application and should work.

To find available services, in Workflow Composer click New Event Workflow and select a service in the Entities pane. The bold text in the Events pane indicates the events supported by a selected service, for example, CheckDuplicateCampusStudentEvent. When called via the GetServiceInstance activity, the CheckDuplicateCampusStudentEvent becomes the CheckDuplicateCampusStudent method call on the iStudentService in the workflow. This screenshot shows how to find all available service methods.

Entity and event for duplicate check

When you drag the GetServiceInstance activity into the Designer window, you are prompted to select the service type (TService). Click dropdown.

Select Types

When you select the 'Browse for Type' option, the list of assemblies and associated services is displayed. Find and select the service and click OK.

Browse for Entity Type

After you have selected a service, the name of the service is inserted into the DisplayName field, e.g., GetServiceInstance<IStudentGroupService>. Proceed to specify the Name and Result.

GetServiceInstance

In the example above, the GetServiceInstance activity is associated with a variable (grpSvc) that detects the IStudentGroupService.

The workflow sequence continues with an Assign activity that assigns the variable from GetServiceInstance activity to the "expiredGroupsResponse" value. The Assign activity invokes the ListExpiredStudentGroups method of the iStudentGroupService. See IStudentGroupService Methods in the Anthology Student Object Library. The end result is that the workflow captures all expired student groups.

Assign expired group

Properties

GetServiceInstance<> Properties
Property Value Required Notes
DisplayName String No Specify a name for the activity or accept the default.
Name InArgument<String> No Specify a name for the service using a VB expression or variable.
Result OutArgument<Service> No The service retrieved by this workflow activity. This is a variable that can be used as input for subsequent workflow activities.

To identify the variable type, in the Variable type field of the Variables pane, select Browse for Types.... In the 'Browse and Select a .NET Type' window, navigate to the service that matches the previously selected service type, for example, Cmc.Nexus.Common.Services.IStudentGroupService and click OK.

variable type