Home| Printable Version
Rules are at the core of Morphyc Architecture based applications. They contain the knowledge (logic) that enables the application to make decisions and to provide the desired results. Each rule represents an if-then structure, and so contains two parts, the Condition that controls when the rule will be fired, and the Actions that will execute when the rule fires. Each RuleBase can contain as many rules as needed to achieve the required functionality.   A new rule is added simply by clicking and dragging it from the toolbar at the top of the screen into the rules area. A new rule is added by simply dragging from the toolbar into the rules container
Each rule has a set of summary icons that summarise the conditions and actions contained within each rule.The top level details that need to be entered for each rule are as follows.
Rule - This field should contain the name of this rule. The entered value can contain alphanumeric characters along with underscores (_) and hyphens (-), and needs to be unique across the RuleBase. Rule Notes - The notes can be used to explain in more detail what the rule does, and why it is required. You can access the notes by hovering over the notes icon located to the right of the rule name. Priority - The priority field should contain a positive number. This value is used to control the execution order of the rules at runtime. When all the rules that are eligible to fire at a given point (based on their conditions) have been found, the one with the lowest value (i.e. the highest priority) will fire first. Any values required can be used, however we recommend a starting point of '10' for pre condition rules, '20' for the main processing, and then '30' for the post conditions. The rules are displayed in priority order, so after changing this value you may find that your rules are reordered. Disabled - Ticking this checkbox indicates that this rule should be disabled. This means that as long as the disable RuleBase Setting is turned on, then this rule will never fire in the resulting application.
Deleting a rule is as simple as clicking the cross icon at the right of the rule display. This will delete the rule, along with all conditions and actions that it contains. Each rule requires a number of XPaths to be specified (in both conditions and actions) for it to work correctly due to the XML nature of the data. Please see the previous section on checking document content for more information on how these can be easily created using RuleMaker.
Checking Document Content Conditions