JAVA

Tuesday 31 December 2019

BAL VS IRL

Multiple Rule Variables – BAL vs IRL

          The way multiple rule variables are declared and instantiated in working memory varies between the BAL and IRL.

Business Action Language(BAL):

      Suppose if we assign ‘Customer’ class instance to a multiple variables using definitions of a rule they are treated as two different instances.

definitions

set ‘customer1’ to Customer;
set ‘customer2’ to Customer;


   Here customer1 and customer2 are treated as two different instances of class Customer and can be acted on independently.

 IRL:

If we consider the same example as above and define multiple variables in IRL as below:
when {
customer1: carrental.Customer();
customer2: carrental.Customer();
} then {

}


     Here the variables customer1 and customer2 will refer to the same Customer instance in working memory and may create conflicts.To ensure it refers to different instances we need to add a test as below:
when {
customer1: carrental.Customer();
customer2: carrental.Customer(?this != customer1);
} then {
}

Friday 20 December 2019

How to update Dynamic domain in Decision Center



How to update Dynamic domain in Decision Center:

                  Dynamic domain feature helps the rule developer prevent errors, business users to extend valid parameters for rules, and eliminates the need for changes to rule service contracts.

Step1: Open Excel file and add few more values:




Step2:

 Update the domain values in name virtual class using synchronize option. Then the new added name values added to the member section.


Step3:
Connect to Decision center and provide Configure Details. So connection is established successfully.


 
Step4:
 Launch the Decision center Enterprise console. Select Decision service project in home tab.
 
Step5:
On the Explore page click the smart folder icon to create a Resource folder.


Click next->For the Query, change to all the Resources for search->click finish. The resource files that you see in Rule Designer are loaded. Download the domain Excel File.












Step7:
 Download the Excel file and Add few more values to Excel sheet. Back to Enterprise console and edit the Domain Excel file.  Click browse to upload the latest file. Once file is uploaded click finish.

Step8:
Go to the Project Page to Upadate the Dynamic domains.





Step8: The new names updated in the list. you can see new name value list in rule authoring.