Create/Save ApplicantEntity and Update Derived Fields
When the CreateEntity<> and SaveEntity<> activities are used with the ApplicantEntity in Anthology Student, the workflow must include a number of Assign activities to ensure that a record is added to the AdEnroll table the same way as when the Anthology Student client is used to add an applicant record. In addition, it is necessary to retrieve the IApplicantServerice event using the GetServiceInstance<> activity (steps 6 and 7) to update the derived fields.
The following steps are required in the workflow:
-
Drag a CreateEntity<ApplicantEntity>activity into the sequence to create an instance of the ApplicantEntity record.
The Result value "A" is defined as a variable with the following attributes. This variable is referenced in the Assign activities below.
-
Use Assign activities to populate the following required fields:
- StudentId
- CampusId
- AssignedAdmissionsRepId
- SchoolStatusId
- LastModifiedUserId
-
Use Assign activities to populate the following optional fields:
- ProgramId
- ProgramVersionId
- StartDateId
- StartTermId
- EnrollmentStatusId
- ShiftId
- GradeLevelId
With these assignments the workflow calculates values for the remaining ApplicantEntity fields and passes the values to the SaveEntity<ApplicantEntity> activity.
The values are calculated (derived) for the following fields:
- BillingMethodId
- GradeScaleId
- ClockHoursRequired
- CreditHoursRequired
- ExpectedStartDate
- MidpointDate
- GraduationDate
- CatalogYearId
Note: If the Program Version has more than one Catalog, the logic identifies the CatalogYearID whose Start Date is nearest to the selected Program Version Start Date.
-
Insert a SaveEntity<ApplicantEntity> activity into the workflow. This activity populates the entire applicant record in the AdEnroll table using the assigned and calculated (derived) values.
-
Optionally, add an If condition to the workflow to catch validation errors. In our example "V" is a variable of type Cmc.Core.EventingValidationMessageCollection.
-
Drag a GetServiceInstance activity into the workflow. The Select Types dialog is displayed.
Click Browse for Types, select IApplicantService, and click OK.
The Display Name of the GetServiceInstance activity is updated to GetServiceInstance<IApplicantService>.
In the Result property, specify a variable of type Cmc.Nexus.Admissions.ServiceIApplicantService.
-
Drag two Assign activities below the GetServiceInstance activity. Assign request and response variables for the applicant service defaults.
Notes:
-
When an Applicant record is added and the Note field is not assigned, the Status History Comment text box in Anthology Student displays the hardcoded string "Added Applicant record".
-
When an Applicant record is added and the Note field is assigned in the workflow, the Status History Comment text box in Anthology Student displays the text of entity.Note that was passed into the workflow.