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:

  1. Drag a CreateEntity<ApplicantEntity>activity into the sequence to create an instance of the ApplicantEntity record.

    CreateEntity ApplicantEntity

    The Result value "A" is defined as a variable with the following attributes. This variable is referenced in the Assign activities below.

    Variable A

  2. Use Assign activities to populate the following required fields:

    • StudentId
    • CampusId
    • AssignedAdmissionsRepId
    • SchoolStatusId
    • LastModifiedUserId

    Assign requiredfields

  3. 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.

  4. 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.

    SaveEntity ApplicantEntity

  5. Optionally, add an If condition to the workflow to catch validation errors. In our example "V" is a variable of type Cmc.Core.EventingValidationMessageCollection.

  6. 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.

  7. Drag two Assign activities below the GetServiceInstance activity. Assign request and response variables for the applicant service defaults.

  • 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.