Instances of the Rule component represent a Dynamic Business Rule defined in your project. This component can fetch, evaluate and modify Rules.
Refer to Oracle BPM Studio Help for details about Dynamic Business Rules.
Create new instances of Rule passing the name of an existing rule to the Rule(String name) constructor. You cannot create new business rules with this component. If the specified rule does not exist, the component with throw an exception.
Method method update() modifies the expression of this Rule instance in memory. Method store() creates new version of the rule and persists the changes. You cannot create new rules with this component.
creditScoreRule = Rule( "credit_score" )
approved = evaluate(creditScoreRule)
if approved == true then
logMessage "Credit approved"
else
logMessage "Credit rejected. Low credit score"
end
approved = this.creditScore()
if approved then
logMessage "Credit approved"
else
logMessage "Credit rejected. Low credit score"
end