In PerformancePiont Planning Business Modeler, a business rule is a short program that performs a business task.
You can create business rules that allocate resources, calculate forecasts according to your criteria, determine variances, or find key performance indicators. Rules can help you run queries, seed data in Office Excel 2007 forms, or move balances from one period to another. You can run rules directly from the Business Rules workspace or as part of a scheduled job.
Like other features of Planning Business Modeler, business rules operate on the multidimensional data in a model. Each rule specifies a particular set of dimensions and members to which the rule applies.
Writing a business rule involves three major phases: plan the rule, write the rule, and run the rule.
Plan the rule
Step 1: Decide what the rule should do
Business rules can perform a wide variety of tasks, from moving data in the model to performing simple calculations. You can create custom rules, or use one of several time-saving alternatives.
Step 2: Identify important factors for implementation
While the rule type that you choose determines what options are available for implementation, you might want to consider implementation even before you select a rule type for your rule. Rule implementation can have a very strong impact on rule performance. In addition, rule implementation determines how Planning Business Modeler stores both the rule and the results of rule execution.
Step 3: Choose a method to create the rule
To save time, you can select from a variety of pre-coded templates that require little knowledge of code. Alternatively, you can create a completely customized rule in one of the several language options supported by Planning Business Modeler.
Write the rule
Step 4: Create a rule set and a rule
Every rule must belong to a rule set. In addition, the rule set type determines the options that you have for the rule type. Then, use the results of your planning and analysis to choose a template, or to specify rule type and implementation.
Step 5: Specify the rule scope
The scope of a rule defines which cells in the model your rule will act on. Typically, a scope consists of a set of dimension members that are enclosed in parentheses. Individual dimensions are separated by commas. Business rules can include two kinds of scopes:
- Destination scope - typically, a SCOPE statement that lists dimensions and members. This scope indicates the model slice that will store the results of the rule.
- Context scope - typically, a set of a few dimension expressions. A context scope is often used with a PEL function. This scope indicates data that the rule operates on that is different from the destination.
|Clarify the rule scope
Answer these questions to help identify the scope elements:
|» When your rule finishes its task, in what cells in the cube will you store results?
|» When your rule performs its task, what cells contain the data that your rule operates on? Are the cells the same as the destination cells, or are some source cells different?
Define the scope
Use Planning Business Modeler tools to insert the Scope statement.
Step 6: Add the rule body
Most business rules in Planning Business Modeler are written in PerformancePoint Expression Language. All rules have standard elements that specify the rule scope, and the calculation or task that the rule performs. See the elements of a business rule
Step 7: Validate the rule and update the model
|Validate a rule
||Check the syntax and semantics of the rule, and verify that the dimensions and program elements in the rule are valid.
|Save the model
||To save a business rule, you must save the model.
|Deploy the rule
||Make the rule available to users in Planning Business Modeler and PerformancePoint Add-in for Excel.
Run the rule
Step 8: Run the rule
When you have finished coding and testing your rule, you are ready to run the rule. The way that you start and run a rule depends on the characteristics of the rule. Some rules can be run by user command from the Planning Business Modeler user interface, and others must be added to a job template and then scheduled in a job.
Important For best results, test the rule before using the rule in a job for users. We recommend running the rule, and then checking the results in a fact table or in an Excel report.