Check Approved Grants for Comments

This workflow checks for entries in the Note/Comments field when a grant or scholarship is saved with a status of 'Approved'. The workflow is triggered by a saving event that occurs when the Save button is clicked on the Awards form (standard interface) or on the Financial Aid Grant / Scholarship form (legacy interface).

Financial Aid Grant/Scholarship form

Financial Aid Grant/Scholarship form

  1. Start the Workflow application from your desktop.

  2. On the Home tab, click New Event Workflow.

  3. In the Entities area:

    1. Click right arrow next to Cmc.Nexus.Contracts.

    2. Click right arrow next to Cmc.Nexus.Sis.FinancialAid.

    3. Click Student Grant Detail (StudentAwardDetailGrant).

  4. In the Events area, click Saving (SavingEvent).

  5. Specify a Name for the workflow and click OK.

  6. Drag an If activity it into the sequence.

    1. In the Condition field, specify the following expression:

      (String.IsNullOrEmpty(entity.Note)) AND (entity.Status.Equals("Approved"))

  7. Drag a CreateValidationItem activity into the Then branch of the If condition.

    1. In the Message field, specify the following string:

      "If grant status is Approved, then a comment is required."

      This message will be displayed in Anthology Student when an approved grant is saved without a comment.

    2. In the Message Type field, select Error (default).

    3. In the Messages field of the Properties pane, enter args.ValidationMessages.

  8. Drag a LogLine activity into the Else branch of the If condition.

    1. In the Text field, specify the following expression:

      "Grant condition check false" & Environment.NewLine

      This expression creates a new line in the event log with the text "Grant condition check false".

    2. In the Level field, select Information (default).

  9. Drag a LogLine activity into the sequence below the If condition.

    1. In the Text field, specify the following expression:

      "GRANT INFO" & Environment.NewLine & " Award Amount: " & entity.AwardAmount & Environment.NewLine & " Create Date: " & entity.CreateDate & Environment.NewLine & " CreatedByUserId: " & entity.CreatedByUserId & Environment.NewLine & " Fund Source ID: " & entity.FundSourceId & Environment.NewLine & " ID: " & entity.Id & Environment.NewLine & " Modified By User ID: " & entity.ModifiedByUserId & Environment.NewLine & " Note: " & entity.Note & Environment.NewLine & " Status: " & entity.Status & Environment.NewLine & " Student Academic Year ID: " & entity.StudentAcademicYearId & Environment.NewLine & " Student Award Summary ID: " & entity.StudentAwardSummaryId

      This expression captures the data from the top section of the Financial Aid Grant / Scholarship form in the event log.

    2. In the Level field, select Information (default).

    Approved Grant Workflow - 1st If statement

  10. Drag another If activity into the sequence.

    1. In the Condition field, specify the following expression:

      entity.ScheduledDisbursements.Count > 0

  11. Drag a ForEach activity into the Then branch of the If condition.

    1. In the Foreach item in field, specify the following expression:

      entity.ScheduledDisbursements

    2. Drag a LogLine activity into the Body of the ForEach activity.

    3. In the Text field of the LogLine activity, specify the following expression:

      Environment.NewLine & "SCHEDULED DISBURSEMENT LINE ITEM: " & Environment.NewLine & " Amount Expected: " & item.AmountExpected & Environment.NewLine & " Disbursement Number: " & item.DisbursementNumber & Environment.NewLine & " ExpectedDate: " & item.ExpectedDate & Environment.NewLine & " ID: " & item.Id & Environment.NewLine & " Lender Fee: " & item.LenderFee & Environment.NewLine & " Note: " & item.Note & Environment.NewLine & " Status: " & item.Status & Environment.NewLine & " StudAcadYearPP Id: " & item.StudentAcademicYearPaymentPeriod.Id & Environment.NewLine & " StudAcadYearPP PayPer Description: " & item.StudentAcademicYearPaymentPeriod.PaymentPeriod.Description & Environment.NewLine & " StudAcadYearPP PayPer Id: " & item.StudentAcademicYearPaymentPeriod.PaymentPeriod.Id & Environment.NewLine & " StudAcadYearPP PayPer TermId: " & item.StudentAcademicYearPaymentPeriod.PaymentPeriod.TermId & Environment.NewLine & " StudAcadYearPP EndDate: " & item.StudentAcademicYearPaymentPeriod.PaymentPeriodEndDate & Environment.NewLine & " StudAcadYearPP StartDate: " & item.StudentAcademicYearPaymentPeriod.PaymentPeriodStartDate & Environment.NewLine & " StudAcadYearPP Sequence: " & item.StudentAcademicYearPaymentPeriod.Sequence & Environment.NewLine & " StudAcadYearPP StudAcadYearId: " & item.StudentAcademicYearPaymentPeriod.StudentAcademicYearId

      This expression captures the data from the Scheduled Disbursements section of the Financial Aid Grant / Scholarship form in the event log.

    4. In the Properties pane of the ForEach activity, specify the following object type in the TypeArgument field: Cmc.Nexus.Sis.FinancialAid.StudentAwardScheduledDisbursement.

      typeargument

  12. Drag a LogLine activity into the Else branch of the If condition.

    1. In the Text field, specify the following expression:

      "Scheduled Disbursements was Empty" & Environment.NewLine

      This expression creates a new line in the event log with the text "Scheduled Disbursements was Empty".

    Approved Grant Workflow - 4th If statement

  13. Check your workflow. Scroll through the workflow or use the fit to screen button located at the bottom of the Designer pane to see the whole workflow based on your screen resolution.

  14. Click Publish. The New Workflow Definition Version window is displayed.

  15. If you want the workflow to be run as soon as the event occurs on the entity, select Enable This Workflow Version, otherwise leave the check box cleared.

  16. Click Save, then Cancel to close the publisher window.