Hi,
It is not possible to change the predefined structure of BAL rules.
We cannot change the meaning the rules so when a part of it doesn't match, we would consider another parts. There are constructions like
any of the following conditions is true
that supports "or", yet this only applies to the boolean expression in "if", not to the pattern described in the "definitions".
If you need to do something when objects from the working memory are matched, and do the same thing if they are not matched, yet another condition applies, you will have to write two rules, one with bindings:
definitions
set cart to a shopping cart;
then ...
and another one
if there is no shopping cart and ...
then ...
You may find some documentation on how to write this second rule at https://www.ibm.com/docs/en/odm/9.0.0?topic=conditions-that-test-existence
I hope this helps
------------------------------
Jean Louis Ardoint
------------------------------
Original Message:
Sent: Sat January 25, 2025 02:26 PM
From: Atmaswaroopa Tripathy
Subject: Changing the default "BAL constructs"
Is there any way we can change the default "BAL constructs" structure that we write a rule. For example, in place of "definitions" if I want to write "Variables".
In place of the
set <variable> to <definition> [in <list> / from <object>] [where <test>*] ;*
let <variable> to <definition> [in <list> / from <object>] [where <test>*] ;*
And also can we change the internal working of the default bal construct?
For example: When the variable declared inside the "definitions" section is not found in the working memory then instead of not executing the rule , can we execute the next sentence of the rule.
Thank you.
------------------------------
Atmaswaroopa Tripathy
------------------------------