Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 35 Business Rules : Working with Business Rules

Working with Business Rules
In TIBCO BusinessEvents WebStudio, you can create, modify, or delete business rules. Any modification after commit goes through the RMS approval process (see Chapter 36, Working with the Approval Workflow in RMS).
A business rule in a project is identified by the .ruletemplateinstance file extension. The rule template instance file is generated when BuildAndDeploy option is selected for the business rule in approvals. See Generating One Business Rule’s Rule Template Instance File for more details.
Adding Business Rules
In TIBCO BusinessEvents WebStudio, business rule is created using a rule template defined in TIBCO BusinessEvents Studio. If a rule template view is associated for the rule template, the business rule has a easy-to-use form based interface to specify conditions and action; otherwise, condition and actions are added using builder. See Rule Template and Rule Template View Overview for overview on rule template, and rule template view.
See Chapter 33, Working With Projects in WebStudio for more details on starting and logging to RMS, and checking out project resources.
To add a business rule
1.
2.
3.
4.
To add a business rule using HTML form
1.
2.
To add a conditional clause using builder
1.
2.
3.
4.
5.
6.
Match Any Conditional clause is true if any of the condition evaluates to true
Match All Conditional clause is true only if all of the conditions evaluates to true
Match None Conditional clause is true only if none of the conditions evaluates to true.
7.
To add a action using builder
1.
In the business rule editor, under the Then section, click Action dropdown to select the actions available for the rule template.
2.
3.
4.
5.
6.
Export a Business Rule
You can export business rules fromTIBCO BusinessEvents WebStudio to rule template instance file. Sample exported rule template instance file content:
<?xml version="1.0" encoding="UTF-8"?>
<RuleTemplateInstance id="738cd4ea-8569-4744-aa86-fb88a89bf0a3" implementsPath="/Rule_Templates/Applicant_PreScreen">
<actions/>
<binding id="minimumIncome" value="5000"/>
<binding id="minimumAge" value="25"/>
<binding id="creditType"/>
</RuleTemplateInstance>
To Export the Business Rule
1.
Open the Export dialog in either of the following ways:
2.
3.
Click Save.
Deleting Business Rules
If the business rule you want to delete has been checked into the RMS project, then you must submit the deletion for approval. After approval, the deleted table is removed from the RMS project, but it is not removed from user’s workspace.
To Delete a Business Rule
1.
In Group Contents, right-click the business rule name and select Delete.
In Group Contents, select the business rule name. Then click the delete icon in the Edit toolbar.
2.
3.
4.
Select Project > Commit so that the RMS master copy of the table is also deleted. OR
Select Project > Synchronize to replace the local deleted copy with the RMS project version of the table.
Business Rule Hot Deployment
To deploy a business rule usaing hot deployment, follow these steps:
1.
2.
3.
Open the CDD of the project and add the property be.cluster.ruletemplateinstances.deploy.dir under the appropriate PU, such as the default PU. This property should point to the same location where the generated Business Rule is located, such as BE_HOME/rms/shared.
4.
5.
Goto MBeans > com.tibco.be > RuleTemplateDeployer > Operations > loadAndDeployRuleTemplateInstances (pass the agent name, such as inference-class). It will tell you that the RTI is deployed.
6.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved