Business Rules

Process Director incorporates a Business Rules engine that empowers users to rapidly implement complex business processes. Business Rules are reusable objects that can be embedded within your Process Timeline and/or Form to conditionally control how they should run and behave in various conditions. Business Rules can be defined as simple conditions, or as sophisticated, interrelated rule sets.

Business Rules can be used to return the result of a single condition or a complex condition set which enables you to incorporate sophisticated business logic into the operation of Form or process definitions. Business Rules can also return a list of users, groups, string values, a single value, or run a Custom Task, based on conditions that you configure.

A common use of Business Rules is to evaluate data from a Form field, then return a value based on the Form field value. When used in this way, Business Rules will use the current form data to make dynamic form decisions based on the current value of the field, rather than the value stored in the database for the Form Instance.

Documentation Examples #

Business Rule Configuration

The following properties are available for configuring Business Rules.

Custom Business Rule Parameters #

The Parameters section of the Business Rule definition enables you to create one or more custom parameters. When a custom parameter is configured, it's value can be passed to the Business Rule via a System Variable.

Note Business Rule Parameters can ONLY be passed via System Variable. There is no method in the UI to pass a custom parameter to a Business Rule, as you would for a Business Value.

You can add the parameter names to be used in the system variable by clicking the Add Parameter button in the Parameters section, then supplying the appropriate Name for each Parameter.

Parameters, once created, can be used in the conditions evaluated by the Business Rule, to return the appropriate values.

In a Business Rule System Variable, you can use the following syntax to both call the Business Rule and simultaneously pass the Parameter(s):

{RULE:BusinessRuleName,$ParameterName1=ParameterValue1,$ParameterName2=ParameterValue2}

The "$" signifier is required to specify the name of the Parameter(s).

Business Rules can be directly associated with a Process Director object, and parameters are not generally necessary for accessing data from the associated object. For example, if a Business Rule is associated with a Form definition, all the Form fields from the associated Form can be accessed from the Business Rule directly, without needing to use a custom parameter. The drawback to this is, of course, that the Business Rule can only be used in the context of a running instance of the associated Form.

On the other hand, if you do not want the Business Rule to be associated with a specific object, and want it to be globally accessible, you could create a custom parameter that could be passed to the Business Rule by any object. The custom parameter value could then be used in all of the Business Rule conditions, as the example screenshot above demonstrates. As long as the object can pass the appropriate parameter value to the Business Rule, any object in the system can call the Business rule to return the correct value via System Variable.

Global vs Local Business Rules

Business Rules are somewhat unique in that, unlike other objects, they can be used both locally and globally within Process Director. A local Business Rule can only be used in the context of a specific Form or Process Timeline. They cannot be called or return a useful value outside the context of a specific running application. For instance, a Business Rule that returns a value based on an evaluation of a specific Form control is almost always a local Business Rule. Indeed, in that case, the Forms Associated with Business Rule property will be set to create an explicit assositon between the Business Rule and a Specific Form definition.

On the other hand, a global Business Rule can be called by any running application. None of the Xxxxx Associated with Business Rule properties on the Properties tab would be set, and the Business Rule would return a valid value no matter what object called it for an evaluation. For example, a Business Rule that returns a User or Group for task assignment in a Process Timeline activity would always return the same User or Group, no matter which Process Timeline prompts it.

So, when deciding where to create and store a Business Rule, one should always consider whether the Business Rule will be used locally or globally. If locally, the Business Rule should reside somewhere in the top-level folder for the application that uses it, such as a Business Rules subfolder. A global Business Rule should be stored in a central location, such as a [Business Rules] folder at the root level of the partition. (The square brackets in the name are intentional.) Just remember that if you create a global Business Rule on a development system, and use it in an application you're building, you'll need to export the Business Rule into the same location on your production server prior to importing the application itself.

Business Rule Samples

Your installation of Process Director should come with sample Business Rules and accompanying Forms and processes in the [Samples] folder. If you don't have this folder, you can contact BP Logix technical support.