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 workflowwhat 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:
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.
When a running workflow encounters a rule, PE 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 PE.
NOTES
If the Rules listener is stopped when a workflow tries to run a rule, PE 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.
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:
NOTE Asynchronous processing creates an extra load on the PE server by requiring scheduling of background rules execution, extra queuing, and extra processing. For a rule-set specified for asynchronous processing, PE 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 may 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.
Note that the setting NumberOfVwisiRuleProcs will be ignored unless both Enable Rules and Allow Asynchronous Rules are set in Process Configuration Console.
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.