Forms Builder Events

alert This content is applicable to Forms Builder version 2.x only.  

Forms Builder’s eventing integration with Workflow enables you to raise events from Forms Builder sequences and capture these events using Workflow or any service bus. The information from the events can be used for validation, setting defaults, creating tasks for staff, and countless other purposes.

Raise Event Rule

Designers of sequences in Forms Builder can choose to raise an event between any form transition. Whenever the Raise Event rule is encountered, Forms Builder collects the field input from previous forms and raises an event with these fields as arguments.

FormsBuilder raise Event Rule

The Raise Event rule has one optional configuration field for EventName. This field can be used to distinguish events coming from multiple Raise Event rules from the same or different sequences.

Event Details

Every event raised from Forms Builderr has some basic properties to work with. You can get details regarding the event and perform different actions in your workflow.

Forms Builder Events
Event Property Description
FormEntity() EventName():string

Fields():IDictionary<string,string>

UserId():int

The FormEntity:
  • holds the data coming in from Forms Builder. This data is arranged in key-value collections representing field names from Forms Builder forms and their corresponding values in text.

  • holds the optional EventName specified in the Raise Event rule configuration.

    Note: To capture a Forms Builder event in a workflow, specify the exact Event Name of the Raise Event rule. For example, in the condition field of an If activity, specify the following:

    entity.EventName = “GM Send Info”

    where "GM Send Info" is the Event Name in Forms Builder.

  • has a UserID, which is the unique identifier provided by STS for the logged in user.

FormTransitionEventArgs() DefaultFields():IDictionary<string,string>

ValidationMessages():ValidationMessageCollection

Subscribers to events from Forms Builder can communicate back to the Forms Builder sequence originating the event via the FormTransitionEventArgs.
  • DefaultFields can be used to set new defaults on upcoming forms or change values on previous forms. This property represents a collection of key-value pairs.

  • ValidationMessages can be used to return messages in response to forms validation.

Application Key IDs Used with Anthology Student

FormEntity contains different identities alongside all the Forms Builder fields being collected. These Ids are created while executing different Forms Builder rules. Some of the Ids are populated based upon the user type. For example, a student always has SyStudentId populated in StudentIdAppKey.

Application Key IDs
Field Name Description
ApplicantEmailIdAppKey Email Id
CampusIdAppKey Campus Id
EnrollIdAppKey Student Enrollment Id generated when new Enrollment is created
IsPaymentMadeAppKey Is Payment Made
NumDuplicatesAppKey Number of Duplicates generated from Duplicate Check Rule
OnlineApplicantIdAppKey Online Applicant Id
PaymentAmpountAppKey Payment Amount App Key
PaymentReceiptAppKey Payment Receipt generated upon successful payment
PendingApplicantsAppKey Pending Applicants Flag
PortalUserIdAppKey Portal User Id points to wpUserID
StudentIdAppKey Student Id points to SyStudentID
SyAddressIdAppKey Address Id generated while saving profile information

Workflow for Forms Builder Events

Once the sequence in Forms Builder has been setup with the Raise Event rule, the next step is to create an event subscriber using Workflow

  1. In Workflow, click on New Event Workflow.

  2. Under Entities, expand Cmc.FormsBuilder.Contracts and select Forms Builder Form (FormEntity).

    Under Events, expand Cmc.FormsBuilder.Contracts and Forms Builder Rule Executed Event (FormTransitionEvent.

    Forms Builder Entities - Events

  3. Create your workflow using the Activities available in the Workflow Designer Toolbox.

    Example

    This workflow makes the ZIP code required when the country is USA and a State is selected. Otherwise, a validation message is created for the applicant.

    The AddToCollection activity sets the default citizenship to "US citizen".

    if statement

For information on how to create event handlers for Forms Builder events, see Create Event Handlers in .NET.

To see how a Forms Builder event can be used in a workflow, see Populate Fields in a Forms Builder Form.