GetEntity<>

The GetEntity<> activity invokes the Get method of an entity service to retrieve an instance of an entity.

When you drag the GetEntity<> activity into the Designer window, you are prompted to select the entity type (TEntity).

Select Entity Type

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

Note: The GetEntity<> activity is not supported for the StudentAdvisors entity because the primary key for this entity consists of two properties. To work with the StudentAdvisors entity, use the StudentAdvisorService – GetStudentAdvisors operation.

Browse for Entity Type

After you have selected an entity, the name of the entity is inserted into the DisplayName field, e.g., GetEntity<StudentGroupEntity>. Proceed to specify the EntityId and Result.

GetEntity

Properties

GetEntity<> Properties
Property Value Required Notes
DisplayName String No Specify a name for the activity or accept the default.
EntityId InArgument<Int32> Yes Specify the entity identifier using a VB expression or variable.
Result OutArgument<Entity> Yes The entity 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 entity that matches the previously selected entity type, for example, Cmc.Nexus.Common.Entities.StudentGroupEntity and click OK.

Variable for GetEntity

Note: Before you use this activity, make sure that both the entity you want to work with and a matching service are available and enabled in Workflow Designer. To check this, click New Event Workflow, select the filter "Only show entity types that have the SupportedEvents attribute", and locate the entity type, for example, Student Group. In this case Workflow Designer shows that both the Student Group (StudentGroupEntity) and the corresponding Student Group Service (iStudentGroupService) are enabled. This indicates that the GetEntity activity is supported for the selected entity type.

Entities and Services