Charge a Fee when the Enrollment Status Changes
This workflow creates a charge when a student's enrollment status changes.
-
Start the Workflow application from your desktop.
-
On the Home tab, click New Event Workflow.
-
In the Entities area:
-
Click next to Cmc.Nexus.Contracts.
-
Click next to Cmc.Nexus.Sis.Academics.
-
Click Student Enrollment Period (StudentEnrollmentPeriod).
-
-
In the Events area, click Saved (SavedEvent).
-
Specify a Name for the workflow and click OK.
-
Drag an If activity it into the sequence.
-
In the Condition field, specify the following expression:
(entity.HasChanged("EnrollmentStatusId"))
-
-
Drag a CVueIdToPersonActivity activity into the Then branch of the If condition.
-
In the CVueIDproperty field, specify entity.StudentId.
-
If desired, change the DisplayName property.
-
In the Variables pane, create a variable for personId with the Variable type of Int32.
-
In the PersonId property field, specify personId.
-
In the PersonType property field, specify Cmc.Nexus.Converters.CVuePersonType.SyStudent
-
-
Drag a CreateCharge activity into the sequence below the CVueIdToPersonActivity activity.
-
In the Charge Code field, select Administration Fee.
-
In the Transaction Type field, select Invoice.
-
In the Person field, specify personId.
-
In the Amount field, specify a dollar amount, e.g., 75.
-
In the Transaction Date field, specify DateTime.Today.
-
In the Post Date field, specify DateTime.Today.
-
In the Description field, specify a description of the charge, e.g., "Service Charge: Enrollment Status Change".
-
In the Prospect field, specify entity.StudentId.
-
In the Student Enrollment Period field, specify entity.Id.
-
In the Reference field, specify a reference code for the charge, e.g., "FEE75".
-
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.
-
-
Drag a SaveCharge activity into the sequence.
-
In the ChargeTransaction property field, specify charge.
-
If desired, change the DisplayName property.
-
If desired, specify a VB expression to select a validation message. The example below does not use validation messages.
-
Enter the name of the charge variable in the ChargeTransaction field of the Properties pane for the SaveCharge activity.
-
-
Check your workflow.
-
Click Publish. The New Workflow Definition Version window is displayed.
-
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.
-
Click Save, then Cancel to close the publisher window.