Construct Events

Prev Next

Construct Events are actions that contain validation rules, business rules, or both. Validation rules run first and validate data before executing any rules. Business rules run after validation rules complete and perform an action. They can be incorporated into each page or for a specific field triggering an action or event.

Events can be created to run:

  • OnSave - OnSave (or OnValidate) event validates records against their data definitions when you save them after adding, updating, or deleting a record.

  • Custom Events in a Column - Executes at the record level from clicking a specific field using a button or based on the value.

Construct Preview uses the Workflows feature in the Orchestrate module to run Events in the background. To view Construct Preview-generated events (workflows), filter the Workflows by setting the Type column to Construct. These workflows are named according to the following convention:

<WebApp Name>_<Page Name>_<Grid/Property Card Name (that has this event registered)>.

You can also create custom workflows in Orchestrate and include them as Events in Construct Preview, enabling you to create various customized validation and business rules. Orchestrate workflows allows you to use features from other modules in the Syniti Knowledge Platform to create a wide range of possibilities for resolving data enrichment and construction issues in Data Migration and Data Governance use cases. Refer to Workflow: Tasks for more information on how to create various Orchestrate tasks in a custom workflow.

Register an Event

  1. On the Construct Preview’s home page, edit the required WebApp. The WebApp configuration page is displayed.

  2. Access Pages > Your Page > Grid or Form > Events in the Tree Navigation panel and select Add Event. A new event is displayed as the child node for Events.

  3. Click the event child node. The Details Pane is updated with the Event fields.

  4. Enter the fields/properties listed in the following table as required using either form-based UI or Advanced mode:

    Field/Property (Name: Type)

    Description

    Supported Values/Notes

    Event Name

    Name of the event. Select OnSave or double-click the newly created event to modify its name.

    Enter a name that matches the field where this event will be linked. maxLength: 128

    Event Description

    Description or purpose of the event

    Enter a description. maxLength: 2000

    Pre Message

    Confirmation message before running

    Enter a pre-message text. maxLength: 2000

    Post Message

    Message after event completion

    Enter a post-message text. maxLength: 2000

    Active

    Enable/disable event triggering

    true, false. default: true

    Row Level Event

    Whether event is tied to a single record

    true, false. default: true 

    Background Event

    Whether event runs asynchronously

    true, false. default: false

  5. You can register following tasks as part of an event:

  6. Click Save.

Event Status

If a Grid or Form is tied to one or more events, the Status column/field displays the status of the last event run. When executing an event on a particular record, this column allows you to track the event's progress in real-time.

Clicking a record's status value in the Status column/field displays any validation or error messages from the last event run. However, this only allows you to rerun the OnSave event.

The following statuses are displayed in the Status column based on the state of the event:

  • None: Denotes that an event has not run even once.

  • Preparing: Denotes that an event is performing initial analysis to execute any dependent event tasks.

  • In Progress: Denotes that an event for the selected record is running.

  • Success: Denotes that an event for the selected record has completed successfully without errors.

  • Completed with Errors: Denotes that an event for the selected record has run successfully; however, one or more validation checks have failed.

Review the validation error message, resolve the issue, and then click the status value or the event-configured field to rerun the event.

Event Design Process

When creating an event, a key column property must be set if the page is based on a view or if the page doesn't have a primary key.

For example, a user creates an event that runs on a Form, but the parameter, the primary key, only displays in the Grid. The user must either:

  • Include the primary key as one of the arguments in the stored procedure (since it should be in both the Grid and Form) and then, in the stored procedure, run a select statement to get another column's value from the Form using the primary key.

  • Include the column in the Grid and hide it via a the Control Status column property with the Grid type.

Below is a list of questions to ask to ensure that an event is fully implemented with all available and relevant features.

  • Should the user be warned before executing the event? If so, include a Pre Message, which prompts the user with an OK or Cancel option for continuing the execution of the event. Most actions that are not easily reversible should include a warning message to ensure the user does not accidentally disrupt a process when executing an event. Enter the message in the Pre Message field in the Grid’s event configuration.

  • Should a Post Message be included? Events display their message after execution. The Post Message ensures that the user always receives a confirmation that their action has completed. Enter the Post Message in the Post Message field on the Form’s event configuration.

Related Articles