Link a Portal Account to a Student Record

Note: This procedure is applicable only for environments that use the Anthology Student product.

When applicants or students create new accounts via the CMCPortalSTS (see Renderer Authentication), a wpUserId (web portal user Id) is generated for them alongside the User Name they choose. The wpUserId must be linked to the syStudent record in the Anthology Student database.

In Forms Builder 3.1 and later, the workflow activity SaveStudentPortalUserAssociation (see Workflow Composer Help) is used to create a wpUserRelation record in the Portal database. The wpUserRelation record establishes a relation between a wpUser record in the Portal database and an syStudent record in the Anthology Student database.

The following example shows how the SaveStudentPortalUserAssociation activity can be used in a workflow for a form sequence:

  1. A sequence consisting of the following forms is created:

    • Welcome
    • Personal Information (Pers. Info)
    • Additional Information (Add. Info)
    • End

    The StateMachine workflow for the sequence contains the forms (States) and transitions (Next, Back). Closed

    StateMachine

  2. Add a CreateEntity activity in the Entry area of the Welcome form to create a propectInquiryEntity. Closed

    CreateEntity

  3. In the Action area of the Next transition from the Pers. Info form, set the Condition to True and add a Sequence with Assign activities to capture the prospectInquiryEntity attributes that are entered on the form, e.g., Student.SchoolStatusId, LeadDate, LeadTypeId, AssignedAdmissionsRepId, and LeadSourceId. Closed

    Assign activities

  4. Add a SaveEntity activity below the Assign activities to save the prospectInquiryEntity record with the assigned values. Closed

    This activity creates a wpUser record in the Portal database.

    SaveStudentPortalUserAssociation

  5. Add an If activity below the SaveEntity activity. Closed

    If activity with SaveStudentPortalUserAssociation activity

    • In the Condition field, specify the following to capture form errors:

      • Not formInstance.ValidationMessages.HasErrors
    • In the Then branch, add a SaveStudentPortalUserAssociation activity with the following properties:

      • PortalUserName = formInstance.UserName
      • StudentId = prospectInquiryEntity.StudentId
      • ValidationMessages = formInstance.ValidationMessages
    • In the Else branch, add a LogLine activity to write the following error message to the log:

      • "Prospect Save has errors "&formInstance.ValidationMessages(0).Message

      We recommend setting the Level value to Information for any LogLine or LogObject activities. See Best Practices for Logging and Logging in Azure.

  6. In the Entry area of the Add. Info form, add a Sequence with a GetEntity activity. Closed

    GetEntity

    • In the GetEntity activity, specify the following properties:

      • EntityId = propspectInquiryEntity.StudentId
      • Result = studentEntity
  7. In the Action area of the Next transition from the Add. Info form, set the Condition to True and add a Sequence with two Assign activities followed by a SaveEntity activity. Closed

    SaveEntity

    • In the first Assign activity, specify the following:

      • studentEntity.StudentAddressAssociation = Cmc.Nexus.Common.Entities.StudentAddressAssociation.IgnoreInStudentAssociation.

    • In the second Assign activity, specify the following:

      • studentEntity.EntityState = Cmc.Core.EntityModel.EntityState.Modified

    • In the SaveEntity activity, specify the following:

      • Entity = studentEntity
      • ValidationMessages = formInstance.ValidationMessages.

      The SaveEntity activity creates a syStudent record in the Anthology Student database.