Charge a Fee when the Enrollment Status Changes

This workflow creates a charge when a student's enrollment status changes.

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

    3. Click Student Enrollment Period (StudentEnrollmentPeriod).

  4. In the Events area, click Saved (SavedEvent).

  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:

      (entity.HasChanged("EnrollmentStatusId"))

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

    1. In the CVueIDproperty field, specify entity.StudentId.

    2. If desired, change the DisplayName property.

    3. In the Variables pane, create a variable for personId with the Variable type of Int32.

    4. In the PersonId property field, specify personId.

    5. In the PersonType property field, specify Cmc.Nexus.Converters.CVuePersonType.SyStudent

    CVueIdToPersonIdActivity - Properties

  8. Drag a CreateCharge activity into the sequence below the CVueIdToPersonActivity activity.

    1. In the Charge Code field, select Administration Fee.

    2. In the Transaction Type field, select Invoice.

    3. In the Person field, specify personId.

    4. In the Amount field, specify a dollar amount, e.g., 75.

    5. In the Transaction Date field, specify DateTime.Today.

    6. In the Post Date field, specify DateTime.Today.

    7. In the Description field, specify a description of the charge, e.g., "Service Charge: Enrollment Status Change".

    8. In the Prospect field, specify entity.StudentId.

    9. In the Student Enrollment Period field, specify entity.Id.

    10. In the Reference field, specify a reference code for the charge, e.g., "FEE75".

    11. In the Variables pane, create a variable to hold the charge instance object called charge. In the Variable type field, select Browse for type and select Cmc.Nexus.Sis.StudentAccounts.AccountChargeTransaction.

      Enter the name of the variable in the Charge field of the Properties pane for the CreateCharge activity.

    Create Charge Activity Example

  9. Drag a SaveCharge activity into the sequence.

    1. In the ChargeTransaction property field, specify charge.

    2. If desired, change the DisplayName property.

    3. If desired, specify a VB expression to select a validation message. The example below does not use validation messages.

    4. Enter the name of the charge variable in the ChargeTransaction field of the Properties pane for the SaveCharge activity.

    Save Charge Activity Example

  10. Check your workflow.

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

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

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