Skip to Content

Business Rules Cheat Sheet

Introduction

This page provides a high-level overview of the different Business Rules available in Vinyl, what they are, and why you use them.

API Call

apicall.png

API Call is a rule type available in Vinyl for use when calling an API endpoint. Selecting this rule will limit the Target results to REST API endpoints only.

Business Object

businessobj.png

Business Object is the most frequently used Business Rule type in Vinyl applications. This rule type allows you to use Events and tie in simple or complex logic via actions and validations. Business Objects are primarily used to build the UI Layer in an application. Business Objects can use Subqueries as part of their logic.

Source and List are two common examples of Business Objects:

  • Source: shows all rows and columns from a table in the Data Layer. References one table and should not include any filters. Source Objects are often used when you need to create an expression or function on the underlying data to present it on the application UI Layer.

  • List: translates the primary key ID value to a user-friendly Title column value. List Objects can be used when you want to display data to the end user that may not be available on the table. List Objects often present information in the form of a drop-down menu that a user can select from.

Calendar

calendar.png

Calendar Business Rules are used to create the business logic for a Calendar that will be displayed on the UI Layer. The benefit to creating a rule with Calendar type is you can configure and organize any required Calendar attributes at the rule level by defining Usage Type.

Usage Type values:

  • Color
  • Description
  • End
  • Sort
  • Start

Chart

chart.png

Chart Business Rules are used to create the business logic for a Chart that will be displayed on the UI Layer in the application. The benefit to creating a rule with Chart type is you can configure and organize any required Chart attributes at the rule level by defining Usage Type.

Usage Type values:

  • Category
  • Color
  • Flag
  • JSON Options Object
  • Sort
  • Value

CRUD

crud.png

CRUD Rules are used when you want to Update, Delete, or Insert data in an application. The associated Actions you select when configuring (Cram, Delete, Insert, Update) define how the rule impacts Target table records. CRUD Business Rules get created and defined in the Business Logic Layer.

CRUD Business Layer Rules will execute your rule in the Business Logic Layer, which means it will cause all the actions and validations on the table or object you are modifying to execute.

XP CRUD Rules means cross platform CRUD and is used when you want to use CRUD between two different data sources.

Action is required to be defined for a CRUD Rule, depending on what you're looking to achieve

  • Update - modify existing records in the Target table
  • Delete - deletes existing records in the Target table
  • Insert - creates new records in the Target table
  • Cram - similar to Insert but won't fail if a primary key already exists. Meaning it will only create a new record if the PK does not exist in the data source and skip over any duplicate key records encountered.

Default

default.png

Default Objects are used to default information appearing in a field on the UI Layer in an application and can also be used on the Data and Business Logic Layers. The goal of Default Rules is to save the User time and to provide a better User experience. A common example is defaulting a Date field for a new record added to today.

Gantt

gantt.png

Gantt Business Rules are used to create the business logic for a Gantt Chart that will be displayed on the UI Layer. The benefit to creating a rule with Gantt type is you can configure and organize any required Gantt Chart attributes at the rule level by defining Usage Type.

Usage Type values:

  • Color
  • Dependency
  • End
  • JSON Options Object
  • Parent Task
  • Sort
  • Start
  • Task
  • Task Group

List

list.png

List Business Rules are used for populating select lists from the UI Layer in an application. List Rules do not have any associated Actions or Validations. The benefit to creating a rule with List type is you can configure and organize any List attributes at the rule level by defining Usage Type.

Usage Type values:

  • Key
  • Title
  • Subtitle

Map

map.png

Map Business Rules are used to create the business logic for a Map that will be displayed on the UI Layer. The benefit to creating a rule with Map type is you can configure and organize any Map attributes at the rule level by defining Usage Type.

Usage Type values:

  • Category
  • Color
  • JSON Options Object
  • Value

Migration

migration.png

Migration Rules are executed when a release is installed on a new server. They are defined like a CRUD Rule and run in the development environment. Migration Rules allow a user to modify the database using the Update, Insert, Delete or Cram actions. These rules are added to Change Management steps which are executed in order when publishing an LP in Vinyl to a new environment. When a Migration Rule is executed, Vinyl takes a snapshot of the rule and embeds it into the Changeset. The Migration Rule is deleted after Executing it as a Migration Rule. These rules are primarily used when moving apps from Development to QA to Production.

Network Graph

networkgraph.png

Network Graph Business Rules are used to create the business logic to display a Network Graph in the UI Layer of an application. The benefit to using this rule type is that it has associated column Usage Types appropriate for Network Graph. When you use this in the UI Layer values will get defaulted in based on the Usage Types.

Notification

notification.png

A Notification Business Rule allows Vinyl to send a message to a User. Messages can be sent via Email, Push Notifications, Text Messages or Vinyl Alerts (in-app notifications). Notifications support file attachments of any file type.

Pivot

pivot.png

Pivot Rules are used to display a Pivot Table in an application. This type of rule allows you to flatten a data set table. Pivot Rules summarize related data that spans across multiple rows and present it in a single row. This output helps draw attention to useful information.

Report

report.png

Report Business Rules allow you to configure business logic without any associated Events. This rule type is intended for different report requirements in the UI Layer, for example, it could be used for a Chart or Grid Panel or Pivot.

Reach

reach.png

Reach Business Rules allow you to restrict data that certain Users have access to in an application. Users will be able to navigate to the same pages, but the data displayed on each page will be customized to only show data the individual User has access to. You could use Reach, for example, if you wanted to provide a Sales User access to only data according to their assigned Region.

Subquery

subquery.png

Subqueries are Business Rules that reside within other Business Rules like Business Objects. Subqueries on their own are not exposed to the application UI Layer, and do not support Business Logic Events. They are typically used to adjust data, perform more complex logic and/or calculations on data. When designing Subqueries try and keep the logic as flat and simple as possible.

Validation

validation.png

Validations are used to protect data integrity. They can be run against data getting manually entered in and prevent a User from adding records that violate Business Logic (for example, duplicate records). Validation Rules can also be used in the Business Logic Layer. If a CRUD Rule is set as Business Layer, Validations will run as well when that CRUD Rule is executed.
Validation messages presented to Users are configurable and can leverage dynamic substitution for improved User experience.

Visibility

visibility.png

Visibility Business Rules determine the state of a control in the UI Layer, meaning what controls are hidden, mandatory or available for editing. The value add of a Visibility Rule is to simplify the page design and User experience. These type rules can only be configured for a Form panel.

Webhook

webhook.png

A Webhook is used to allow for any system to invoke custom callback Events into Vinyl. A Webhook is a user-defined HTTP callback and is typically triggered by an Event. If a Webhook is being used in the form of an Email or text message, depending on the User response, Vinyl will respond accordingly by invoking the specified Event.

XP Crud

xpcrud.png

An XP CRUD Rule is used to create and execute a CRUD Rule across data sources. XP type Rules are designed to allow logic to run across different data sources.

XP Validation

xpvalidation.png

An XP Validation Rule is used to create and execute Validation Rules across data sources. XP type Rules are designed to allow logic to run across different data sources.