Introduction

In a project, there are a few repetitive tasks that need to be done regularly or on some Business criteria. Business Rule 2.0 helps you perform such repetitive tasks so that you can save your time and focus on more important work. With Business Rule 2.0, you can automate certain things in your projects depending on specific criteria. 

Navigation

To configure a Business Rule 2.0, navigate to the project, hover over the top breadcrumb, expand the Configure menu, and select Business Rules 2.0.

Note: The menu is only accessible to the Project manager persona of that project.

Advantages of using Business Rules

  • No coding or scripting is required.
  • Reduce the manual work and fasten the day-to-day processes.
  • It saves time for team members to focus on other important things.
  • Creating Business Rules in Nimble is easy as you can visualize the flow of the rule which helps you understand the triggers, conditions, and actions, in a better way.

Prerequisite

Business Rules 2.0 can be created for Form 2.0 forms only. It lists only the forms in the card type section that are configured through Form 2.0. 

Main Components of Business Rule 2.0

A Business Rule 2.0 is made up of 3 important parts – 

  • Triggers 
  • Conditions and Conditions Group
  • Actions

Triggers 

Triggers are the events that kick off a rule. If a certain trigger /event occurs, then the rule defined on it will be kicked off. They start the execution of your rules. Triggers will listen for events in the application, such as when a form is loaded or when a field value is changed. 

There are 4 types of triggers – 

  • On load – Business Rule will be executed if the form is loaded/ reloaded. 
  • On field change – Business Rule will be executed if the value of the set field is changed. 
  • On create – Business Rule will be executed on the creation of a new instance of a form.
  • On update – Business Rule will be executed if there is any update in the instance of a form.
  • On block- Business Rule will be executed if a card is blocked, allowing you to automate actions such as creating, updating, or further blocking/unblocking cards.
  • On block-Business Rule will be executed if a card is unblocked, allowing you to automate actions such as creating, updating, or further blocking/unblocking cards.

Business Rule Event Triggers

Conditions 

Conditions let you refine a rule. For example, if the defined condition is Priority = High for a form, then if the priority is set high in an instance the rule is executed on that form instance.

Conditions let you refine the scope of the event trigger for your business rule. They must be met for your rule to continue running. Conditions can be like when an attribute in a particular form has a defined value. For example, if priority is high, then “Mark Robinson” should be set as the card owner or the Class of Standard is Expedite, etc.

You can select single or multiple conditions for a Rule. For example, a Rule should be executed if the Priority is High and the Card Owner is Unassigned. The conditions can be applied to attributes.

To set a condition for a rule, you need to first select the card type and then the value for its attributes. So, if the selected card type has the value (set in the condition), then the condition will be fulfilled and the rule will be executed.

Business Rule 2.0 supports the following conditions as per the field type –

Field Type Supported Conditions
Text

Is

Is not

Contains

Does not contain

Number

Is equal to 

Is not equal to

Is greater than

Is less than

Date and Time

Is

Is not

Is after

Is before

Actions 

When the defined condition is met for a form instance then the set actions are executed. For example, if a Rule says, set Owner = Mark Robinson if the Priority is high then on setting the priority as High of that instance, the owner is set as Mark Robinson.

Actions are the doers of the rule. They let you automate your activities and make changes within forms. They allow you to perform many activities, such as editing the attributes of a card, sending mail, creating a new card, and so on. 

Actions

Business Rule 2.0 supports the following actions – 

  • Show Tabs 
  • Hide Tabs
  • Show Blocks
  • Hide Blocks
  • Show Field 
  • Hide Field
  • Set field as mandatory
  • Set field as optional
  • Enable Fields
  • Disable Fields
  • Set field value 
  • Create card
  • Update card
  • Send mail
  • Flag card
  • Unflag card

The availability of actions differs depending upon the trigger and the context set for the business rule.

How to Create a Business Rule 2.0 

You can create a business rule 2.0 for the forms configured through Forms 2.0 only. The product shipped form and the ones not configured through Business Rule 2.0 do not appear in the Rule 2.0 creation list. For example, let’s create a rule for the Purchase Order form so that if the customer address is out of California state, then the shipping value should be charged as 200 per order. 

To create a rule, perform the following steps – 

  1. Navigate to the Business Rule 2.0 listing page.
  2. Click the ADD button on the top right corner.
  3. To enter the name of the rule, click in the Rule Details box and enter the Name and Description of the rule.
    Name and Description
  4. Select the persona to which the rule should be applied like Team Member, Project Manager, or all, and click the NEXT button. By doing this when the rule is getting executed it will check for persona first. As shown in the below screen the Rule is applicable for the persona Consultant, Customer, and Executive. If any other persona logs in and triggers the same rule as defined in the Business Rule then it will not execute the Business Rule.
    Persona
  5. Click on the Select event trigger to call the rule box to select the trigger such as On load, or On field change. The rule will be triggered when the selected event occurs. For example, if the trigger is On field change, then the rule will be triggered on the change of the field value.
    Business Rule Event Triggers
  6. Select the card type and field on which you want the rule to apply and click the NEXT button.
    Card Type
  7. Click on the Add icon to add the action or condition for the rule.
    Add condition
  8. To specify the condition for the rule, click Condition and specify the field name, condition, and the value for the field name. On meeting this condition, the rule will be executed. You can also add multiple conditions by clicking the Add icon at the end of the condition or delete a condition by clicking the Delete icon. Click NEXT. To know the list of available conditions, read here.
    Condition
  9. Click the Add icon to define the action for the given condition.
    Action
  10. Specify the action and the field on which the action should be performed. You can add multiple actions by clicking the Add icon at the end of the action row or delete an action by clicking the Delete icon. Click NEXT. To know the list of available actions, read here.
    Action
  11.  The visual flow of the entire Rule is shown to help you understand its flow at one glance. You can also add an else if condition or condition group if required.
    Flow

Create Multiple Cards using Fetch and Populate

You can configure a Business Rule that allows you to create multiple instances of a card type when the specified trigger is executed. For example, consider there is an Employee form and whenever a new instance of an Employee form is created then multiple Tickets should be created automatically. Each Ticket should belong to one deliverable and should be assigned to a specific team member in the respective team.  You can create multiple instances of a form using the Fetch and Populate option available under the Create card action.

Fetch and Populate

Now, let’s understand the Fetch and Populate option with the help of the above example and configure the rule step by step.

  1. Configure an Employee form.
    Employee
  2. Configure a Deliverable form and create the instances for all the deliverables that need to be given to a new employee.
    Del
  3. Configure a Ticket form whose multiple instances should be created on the creation of a new Employee form.
    Ticket form
  4. In the Ticket form, insert the Lookup type of fields and map these fields to the fields of the Employee form and Deliverables form.
  5. Now to configure a Business Rule, navigate to Business Rule 2.0 screen and click the ADD button.
  6. Specify the name of the rule.
  7. Select the Personas on which the rule should be applied.
  8. Click Next and select the trigger as On create and the card type as Employee, as this rule should be triggered on the creation of a new instance of the Employee form.
  9. Click Next and click Action to specify the action for the rule. For the above use case, we don’t need to specify the condition.
  10. Select Context as Traced card.
  11. Select action as Create card.
  12. Select Card type as Tickets as multiple tickets should be created on the execution of the rule.
  13. Select the Fetch and Populate option.
    Fetch and Populate
  14. On selecting the option, the fields of the Tickets form are automatically mapped with the fields of the Employee form and Deliverables form. You can update the mapping of the fields as per your requirements.
    Mapping
  15. For the multiple instances of the form, the names of the Tickets need to be defined. For that, we can define a formula or give a static name by selecting the User Input option. To define the formula, click the Configure formula link and configure the formula.
    Name
  16. Click the Save button.

Now, when a new employee is added to the Employee form, multiple instances of the Tickets form are created as per the Deliverables defined and are assigned to the respective team members.

Ticket Copy

  • Was this helpful?
  • Yes   No