Skip to Content

Configure Events in Vinyl

This article discusses the different type Events available in Vinyl (Intrinsic and Custom), Event Detail Options, and when to configure Events on the Data Storage Layer vs. Business Object.

Intrinsic Events

Vinyl has the following Intrinsic Events available to be configured to have associated Actions or Validations at the Data Layer and the Business Logic Layer:

  • Delete – Associated Action(s) or Validation(s) will trigger upon a record being Deleted
  • Insert – Associated Action(s) or Validation(s) will trigger upon a record being Inserted
  • Save – Associated Action(s) or Validation(s) will trigger upon a record being Saved
  • Update – Associated Action(s) or Validation(s) will trigger upon a record being Updated

Event Detail Options

The following section describes information that can be configured for an Event:

  • Name – the name used to define the event
  • Refresh Scope
    • Data Object – Event can affect other rows in this data object
    • Global – Event can affect other data objects, reload everything
    • None – Input values are unaffected by the event
    • Row – Event can affect values in this row
  • Active – indicates whether the Event is currently active or not
  • Confirmation – the Message configured here is displayed to the User to confirm if they wish to proceed with the action
  • Success – the Message will be displayed to the User after a successful Action has been performed
  • Failure – the Message will be displayed to the User after an Action has failed
  • Skip Parent – if enabled, the event will skip any parent Events and associated Actions
  • Execution Type – determines when the Event will run. Options include:
    • Foreground – event executes in the foreground
    • Launch via Schedule (Background) – event will be executed in the background when scheduled
    • Launch Now (Background) – event will be executed in the background when invoked
    • Launch Now or via Schedule (Background) – Event will be executed in the background when invoked or scheduled
  • Use Lock – enables event locking. Use caution with this option, see Event Concurrency and Locking

Custom Events

In addition to the Intrinsic Events available in Vinyl, you can define Custom Events which can have Actions or Validations associated with them. Custom Events can be fired from the Application UI Layer from the following Control Types: Text, Images, Buttons, Lists.

Where Events get Configured

Events can be configured on the Business Logic Layer and/or the Data Layer. Best practice is to configure any Events on the Data Layer, unless there is a business reason to configure it on the Business Logic Layer instead. Reasons are discussed in this article.

Important

Vinyl will allow you to configure an Action/Validation on BOTH the Data Layer and the Business Logic Layer. Vinyl will not error on a User setting up in both locations, and the result is that the Event gets fired twice. Use caution when configuring Events to put them in the correct location.

Data Layer

It is faster, easier and simpler to maintain and use Events when they are configured on the Data Layer. Best practice when configuring Events is to always configure Events on the Data Layer, unless:

  • You are configuring Actions or Validations on Intrinsic Events that you only want run on specific defined pages
  • The associated Action/Validation requires binding that is not on the Table

For both reasons listed above, you would instead want to configure the Event on the Business Logic Layer.

To Configure an Event on the Data Layer

The following steps describe where to navigate in Vinyl to configure the Event on the Data Layer. Events typically require a Business object Rule to be created prior to this step, and for you to connect the Event to the Application UI Layer after this step.

  1. Navigate to the App Workbench
  2. Click Tables
  3. Locate the Table you want to configure the Event for and click the Events icon
  4. Configure the Event and associated Action or Validation information

    1. If using an Intrinsic Event, select it from the Data Storage Events panel, click the pencil edit icon, and then click Create & Register on the Actions or Validations panel (depending on type of Event being configured)
    2. If using a Custom Event, click + Table Event from the Data Storage Events panel and assign a unique Name and Save. Next click Create & Register on the Actions or Validations panel (depending on type of Event being configured). Select the Rule created to associate with the Event, assign any additional information required, and click Save.

Business Logic Layer

As discussed in the Data Layer section, Events should generally be configured on the Data Layer. There are few exceptions to this, reasons you want to configure an Event on a Business Logic Layer instead include:

  • You are configuring Actions or Validations on Intrinsic Events that you only want run on specific defined pages.
  • The associated Action/Validation requires binding that is not on the Table.

Configuring an Event on a Business Object lets you skip the parent (the Data Object).

To Configure an Event on the Business Logic Layer

The following steps describe where to navigate in Vinyl to configure the Event on the Business Logic Layer. Events typically require a Business Rule to be created prior to this step, and for you to connect the Event to the Application UI Layer after this step.

  1. Navigate to the App Workbench
  2. Click Rules
  3. Locate the Business Rule you want to configure the Event for and click on the corresponding Events button. For example: Employee (Source)
  4. Configure the Event and associated Action or Validation information

    1. If using an Intrinsic Event, select it from the All Events panel, click the pencil edit icon, then click Create & Register on the Actions or Validations panel (depending on type of Event being configured)
    2. If using a Custom Event, click + Rule Event from the All Events panel and assign a unique Name. Next click Create & Register on the Actions or Validations panel (depending on type of Event being configured). Select the Rule created to associate with the Event, assign any additional information required, and click Save.