How do I write a business rule?
A business rule is a short program that performs a business task. Business rules are at the heart of Planning Business Modeler. 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 Microsoft Office Excel forms, or move balances from one period to another. Rules can be run directly from the Business Rules workspace or run as part of a scheduled job.
This topic discusses the high-level steps for creating a rule.
Additional important information
Business rules often depend on specific dimension structures in a model or on particular model properties. Be sure to check the documentation for the specific type of rule you will be writing.
Prerequisites
Before writing a rule, do the following:
Make sure that you have Modeler permissions.
Deploy the model site if you have not already done this; otherwise, the rule will not validate.
Writing a business rule
Use the steps in the following table to track your progress.
Step | Task | Related topic |
---|---|---|
1. |
From a Business Rules workspace, select the applicable rule set to contain your new rule. If no existing rule set is appropriate, you can create a new rule set |
|
2. |
Identify the implementation factors that are important for your rule. |
|
3. |
Decide how you want to create the rule.
|
|
4. |
In the Business Rules workspace, create the rule. |
|
5. |
Specify the scope of the rule.
|
Inserting a member of a dimension in a rule - or - |
6. |
If you are writing the rule in PEL, write the rule text in the Rule Expressions pane. Otherwise, continue to step 7. |
|
7. |
Validate the rule, and fix any parsing and semantic errors that occur. |
|
8. |
Save your new rule by saving the model. |
See "Save work in progress" in the product help. |
9. |
Deploy the rule to make it available for use. |
|
10. |
In the Business Rules workspace, run the rule to test it. |
Next steps
After your new rule runs without error, you can include your new rule to run in a job. For information about jobs, see "Workflow and process scheduling in Planning Business Modeler" in the product help.