Blog Posts Business Management Process Management

Business Rules

Blog: Comidor Blog

Comidor offers a variety of features in order to apply business rules in processes and custom apps to cover any possible scenario and enhance the capabilities of your apps and workflows.

In particular, you can include the following business rules:


Gateways

One of the business rules is the Gateways in a workflow.

A gateway is used to determine the branching, forking, merging, and joining of paths drawn by sequence flow. In Comidor we have Exclusive, Inclusive, and Parallel gateways.

Workflow design | Comidor Platform

Conditional Flow

Through Conditional Flows, you can connect your workflow elements (activities, gateways, or events) and design any possible/desired alternative path. For example, once a Task is created you should connect it with the previous element with a Conditional Flow. In the conditional flow form:

Workflow conditions | Comidor Platform

 

Once the above step(s) have been completed, a conditional flow with your brief description will be added to your workflow design between the standard start event and the task you have created or between activities/gates.

Diamonds in the conditional flow refer to Source state and arrows to Target State, blue: Running, green: Completed, black/white: Canceled, red: Failed, grey: Scheduled, orange: Paused.


Field Rules

Another type of business rule is available both in workflows & app designer, for process and non-process enabled apps.

The field rules functionality enables you to hide or show fields inside forms when certain conditions are met.

  • Create custom condition scenarios for fields and select in which scenario the fields are going to be shown or hidden.
  • Select more than one scenario – field condition for a specific field. This enables you to cover multiple scenarios.
  • Eliminate the number of forms that need to be created and make your adjustments to one simple form.
  • Hide sensitive information which should be displayed only for certain users, roles, or groups in a workflow.

To access Field Rules go to the App Factory icon > Workflow Automation > Workflows. Access the Workflow you are working on and select the tab Field Rules.

Create Field Rules

To create a new Field Rule press on the “+” button, and a creation form opens.Field Rules | Comidor Platform

 

  1. Give a Rule title
  2. Select the Action to be performed: you can either Hide or Show a field
  3. Choose the name of the User Field that you wish to perform the above action to
  4. Set in which Form you wish this rule to be applied (from the user forms that the selected field is displayed)
  5. Select the desired Save option (refer to Quick Reference Guide)

 

Custom Condition Builder

After saving the Field Rule, and while being at the view form, you can add conditions.

  • Click on the ‘+’ icon to insert a new row
  • Select the unit that the field comes from (Process, Application name, etc.)
  • Choose the Name of the Field and its value
  • Use AND, OR, and parenthesis to form your conditions
  • After adding all the rows of conditions you need, click on the Publish condition button.

Field Rules | Comidor Platform

Manage Field Rules

  • If you want to make any changes to a Field Rule, simply select the respective Field Rule and click on the pencil icon.
  • After making any changes click on Save.
  • In order to change the conditions, simply make the changes you wish in the view form of the Field Rule, and then, press the Publish condition.
  • You can Delete one or more Field Rules, by multi-checking them in the Field Rules table and then clicking on Delete.

Field Rules | Comidor Platform

Field Validation

This kind of business rule can be applied both to process-enabled and non-process-enabled apps.

In the form designer, you can set desired properties to each user field:

Validation Rules | Comidor Platform

The value on the “Pattern” field should be a “Regular Expression” in order to validate the input data on the field. The “Pattern Error Message” field is the custom error message that should be displayed if the validation fails.

Validation Rules | Comidor Platform

Links for creating and testing “Regular Expressions”: https://regexr.com/ and https://www.regular-expressions.info/

Here are some examples of “Regular Expressions”:

  • To search for an email address: b[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,}b
  • For an email field with the option to leave the field empty: ^$|^([a-zA-Z0-9_-.]+)@([a-zA-Z0-9_-.]+).([a-zA-Z]{2,5})$
  • For a text field with only alphabetical characters: ^[a-zA-Z ]*$
  • For a numeric field having only digits: ^[0-9]+$
  • For a numeric field with only 3 digits between 1 to 9: [1-9]dd
  • For an integer number that can be negative and has a maximum of 10 digits: ^s*-?[0-9]{1,10}s*$
  • For allowing the field to remain empty use this string : ^$| and then use the correct pattern.
    • Note: In a non-mandatory field with a pattern, if the pattern is not set to allow the field to be left blank, the “Pattern Error Message” will be displayed.
  • Pattern for Greek IBAN:^GRd{9}[0-9A-Z]{16}$ (you can find  IBAN patterns in this link)

Validation Rules | Comidor Platform

Additionally, you can hide user fields if their value is not set, or only when they have value – depending on your scenario. Choose the respective option in your form.

Shell Command & Script before save

You can add scripts to a workflow design within forms to the “script before save” section and/or to the Shell Command component of the workflow design.

Scripts can also be added in form of non-process enabled apps in the app builder.

When adding a Shell Command you can define:

Workflow elements | Comidor Platform

 

If you add a script within forms to the “script before save” section, the script will run after the user saves the form/completes a task with this form.

We commonly add a “script before save” to check the user’s input and populate error messages. For example, we can include if statements to check the values of fields, assign values to fields, and many more.

Script before save | Comidor Platform

This will remove the need to add a shell script in the workflow itself.

For more info regarding scripting please contact us at support@comidor.com.

The post Business Rules appeared first on Comidor Low-code Automation Platform.

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/business-rules/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×