About business rules

Workflow authors and business analysts can create and add business rules to individual steps of a workflow definition. Third party rules software can be used to separate the business rules from the process, making it easier for a business analyst to adjust a complex process by modifying the rules, rather than modifying a workflow definition.

To implement rules functionality in a workflow, the workflow author and the business analyst work together to determine how rules will be used in the workflow—what decisions will be controlled by rules, what workflow data will be required, appropriate names for the rule sets, and the steps in a workflow where the rules will execute. Each step in a workflow can have multiple rules, and the rules can execute at different stages of the step: before execution, on save, or after completion.

Rules can control the following types of operations in a workflow:

Steps to implement rules functionality in a workflow definition

  1. Install third party rules software that supports FileNet Rules Connectivity Framework. See the documentation provided by the rules software vendor.
  2. Enable rules integration in Process Task Manager and Process Configuration Console. See "Enable Rules Listener Integration" in the IBM FileNet P8 Platform Installation and Upgrade Guide for instructions.
  3. Configure the Rules Listener connections in Process Task Manager (see Configure other server connections and Rules Engine general properties for information.)
  4. Using Process Designer, specify data fields and rule-sets that will be used in a particular workflow definition. See Workflow Properties - Advanced in Help for Process Designer. For each step where a rule-set will execute, specify the stage: before execution of the step, on save, or after execution.
  5. Transfer the workflow definition to the Process Engine database. During the transfer process, the rule-sets defined in the workflow definition are passed to the Rules Listener, along with all the data fields in the workflow definition.

  6. Develop the rules in the rules software using data fields defined in the workflow definition.

Rules in a running workflow

When a running workflow encounters a rule, Process Engine sends a request to the Rules Listener (an interface provided by FileNet), which passes the request to the rules software. The rules software executes the rule-set and returns the results to Process Engine.

NOTES 

If the Rules listener is stopped when a workflow tries to run a rule, Process Engine sends the work object to the Instruction Sheet Interpreter (ISI) queue. Once the Rules listener is restarted, the ISI will resubmit the work object to the Rules listener.

If the Rules Engine interface is disabled in Process Configuration Console, workflows will run but will ignore any rules called by the workflow.

Configure for asynchronous rules processing

While the Rules software can execute most rule-sets in less than one second, some rule-sets, such as database lookups, require longer processing time. While a VWJs process is waiting for a response from the Rules software it is not available to process other incoming requests. To improve workflow performance, an administrator can configure your system for asynchronous (background) rules processing, and the workflow author can identify the specific rule-sets that require this processing.

If you have rule-sets which cannot be executed by the rules engine in a sub-second time frame, you can complete the following steps to enable asynchronous rules processing:

  1. Complete the steps to implement rules functionality. See About rules for an outline of the steps.
  2. In Process Configuration Console, select the VWService and display the Properties.
  3. On the Runtime Options tab, select the Allow Asynchronous Rules check box to make the Asynchronous Rules option available in Process Designer.
  4. Work with the workflow author to identify the specific rule-sets that will use asynchronous processing.

NOTE  Asynchronous processing creates an extra load on the Process Engine server by requiring scheduling of background rules execution, extra queuing, and extra processing. For a rule-set specified for asynchronous processing, Process Engine queues the rules execution to the ISI queue for background execution. A rule-set not specified for asynchronous processing is executed via the normal execution path. Therefore, to avoid overall system degradation, only rule-sets that require long process time should be categorized for asynchronous processing.

CAUTION   It is strongly recommended that you do not use Asynchronous Rules with OnSave option because a step which was previously locked will be automatically unlocked after the rule has been executed, which might cause unexpected behavior in your application. When a rule executes asynchronously, the work item is removed from its queue, put into the isi queue for execution by the vwisi process, and then returned to the original queue. During this procedure, it is not possible to retain the lock on the work object, so after the asynchronous rule executes, a work item that was previously locked will no longer be locked by the user. This issue does not apply for rules executed asynchronously Before Execution or After Completion of the step.

For cases where a single vwisi process cannot empty its queue fast enough, you can use the following procedure to increate the number of vwisi processes to serve the InstructionSheetInterpreter queue.

  1. Edit the vwserver.ini file on the Process Engine server.
  2. Locate the following line in the file, or add it if it does not exist. (Remove the semicolon if the line is commented out.)

Note that the setting NumberOfVwisiRuleProcs will be ignored unless both Enable Rules and Allow Asynchronous Rules are set in Process Configuration Console.

Restoring rules functionality after an isolated region is initialized

When an isolated region is initialized, workflow definitions with associated rule-sets are deleted. When the initialization is complete, you can retransfer the workflow definitions. See documentation provided by the Rules software vendor for instructions for re-establishing the connection with the appropriate rule-set.