% % $Id: hekate_case_upsell-rt.pl,v 1.2 2009-11-24 10:44:05 kkluza Exp $ % % File generated by HeKatE Qt Editor ver. M6_10 % % HeaRT case % % % Copyright (C) 2006-9 by the HeKatE Project % % HeaRT has been develped by the HeKatE Project, % see http://hekate.ia.agh.edu.pl % % This file is part of HeaRT. % % HeaRT is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, either version 3 of the License, or % (at your option) any later version. % % HeaRT is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with HeaRT. If not, see . % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% :- ensure_loaded('heart.pl'). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TYPES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%% xtype [name: boolean, base: numeric, length: 1, scale: 0, desc: boolean, domain: [0,1] ]. xtype [name: integer, base: numeric, length: 10, scale: 0, desc: integer, domain: [-2147483648 to 2147483647] ]. xtype [name: default, base: symbolic, domain: [none/1], ordered: yes ]. xtype [name: profile, base: symbolic, desc: 'one of the possible customer status', domain: ['New'/1,'Bronze'/2,'Silver'/3,'Gold'/4,'Platinum'/5], ordered: yes ]. xtype [name: products, base: symbolic, desc: 'products offered by the bank', domain: ['Checking Account','Overdraft Protection','Saving Account','CD with 25 basis point increase','CD with 50 basis point increase','Brokerage Account','Money Market Mutual Fund','Mortgage Loan','Home Equity Loan','Car Loan','Credit Card','Credit Card with no annual fee','Debit/ATM Card','Web Banking','Web Banking with no charge'] ]. xtype [name: amount, base: numeric, length: 12, scale: 2, desc: 'amount of money', domain: [-1000000000.00 to 1000000000.00] ]. xtype [name: date, base: numeric, length: 8, scale: 0, desc: date, domain: [19700101 to 20991231] ]. %%%%%%%%%%%%%%%%%%%%%%%%% ATTRIBUTES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%% xattr [name: balance, abbrev: balan, class: simple, type: amount, comm: in, desc: 'a customer\'s account balance' ]. xattr [name: profile, abbrev: prof, class: simple, type: profile, comm: inter, desc: 'one of the possible customer status' ]. xattr [name: registerDate, abbrev: regi1, class: simple, type: date, comm: in, desc: 'the date of registering the client as a customer' ]. xattr [name: '{offeredProducts}', abbrev: '{off1}', class: general, type: products, comm: out, desc: 'products offered by the bank to the customer' ]. xattr [name: '{products}', abbrev: '{pro1}', class: general, type: products, comm: in, desc: 'products owned by the client' ]. %%%%%%%%%%%%%%%%%%%%%%%% TABLE SCHEMAS DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%% xschm tableSetCustomerProfile: [balance] ==> [profile]. xschm tableUpsellRules: [profile,'{products}'] ==> ['{offeredProducts}']. xschm tableUpgradeCustomerProfile: [registerDate,profile] ==> [profile]. %%%%%%%%%%%%%%%%%%%%%%%%%%%% RULES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%% xrule tableSetCustomerProfile/1: [balance in [0.000 to 499.99]] ==> [profile set 'New'] :tableUpgradeCustomerProfile. xrule tableSetCustomerProfile/2: [balance in [500.00 to 1999.99]] ==> [profile set 'Bronze'] :tableUpgradeCustomerProfile. xrule tableSetCustomerProfile/3: [balance in [2000.00 to 4999.99]] ==> [profile set 'Silver'] :tableUpgradeCustomerProfile. xrule tableSetCustomerProfile/4: [balance in [5000.00 to 14999.99]] ==> [profile set 'Gold'] :tableUpgradeCustomerProfile. xrule tableSetCustomerProfile/5: [balance in [15000.00 to 10000000.00]] ==> [profile set 'Platinum'] :tableUpgradeCustomerProfile. xrule tableUpsellRules/1: [profile in ['New','Bronze','Silver'], '{products}' supseteq ['Checking Account'], '{products}' notsim ['Money Market Mutual Fund','Mortgage Loan']] ==> ['{offeredProducts}' set ['Saving Account','Debit/ATM Card','Web Banking']]. xrule tableUpsellRules/2: [profile in ['New','Bronze','Silver'], '{products}' supseteq ['Checking Account','Overdraft Protection'], '{products}' notsim ['CD with 25 basis point increase','Money Market Mutual Fund','Credit Card']] ==> ['{offeredProducts}' set ['CD with 25 basis point increase','Money Market Mutual Fund','Credit Card']]. xrule tableUpsellRules/3: [profile in ['New','Bronze','Silver'], '{products}' supseteq ['Checking Account','Saving Account'], '{products}' notsim ['CD with 25 basis point increase','Money Market Mutual Fund','Credit Card']] ==> ['{offeredProducts}' set ['CD with 50 basis point increase','Money Market Mutual Fund','Credit Card','Debit/ATM Card','Web Banking']]. xrule tableUpsellRules/4: [profile eq 'Gold', '{products}' supseteq ['Checking Account'], '{products}' notsim ['CD with 50 basis point increase','Money Market Mutual Fund','Web Banking']] ==> ['{offeredProducts}' set ['CD with 50 basis point increase','Brokerage Account','Money Market Mutual Fund','Credit Card','Debit/ATM Card','Web Banking']]. xrule tableUpsellRules/5: [profile eq 'Platinum', '{products}' supseteq ['Checking Account','Saving Account'], '{products}' notsim ['CD with 50 basis point increase','Money Market Mutual Fund','Web Banking']] ==> ['{offeredProducts}' set ['CD with 50 basis point increase','Brokerage Account','Money Market Mutual Fund','Credit Card with no annual fee','Debit/ATM Card','Web Banking with no charge']]. xrule tableUpgradeCustomerProfile/1: [registerDate lt 20000101, profile in ['New']] ==> [profile set 'Bronze'] :tableUpsellRules/1. xrule tableUpgradeCustomerProfile/2: [registerDate lt 20000101, profile in ['Bronze']] ==> [profile set 'Silver'] :tableUpsellRules/1. xrule tableUpgradeCustomerProfile/3: [registerDate lt 20000101, profile in ['Silver']] ==> [profile set 'Gold'] :tableUpsellRules/4. xrule tableUpgradeCustomerProfile/4: [registerDate lt 20000101, profile in ['Gold']] ==> [profile set 'Platinum'] :tableUpsellRules/5. xrule tableUpgradeCustomerProfile/5: [registerDate lt 20000101, profile in ['Platinum']] ==> [profile set 'Platinum'] :tableUpsellRules/5. xrule tableUpgradeCustomerProfile/6: [registerDate in [any], profile in [any]] ==> [profile set profile] :tableUpsellRules. %%%%%%%%%%%%%%%%%%%%%%%%% STATES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%% xstat tableState1: [balance,1500.00]. xstat tableState1: [registerDate,19940526]. xstat tableState1: ['{products}','Checking Account','Overdraft Protection','Web Banking']. xstat tableState2: [balance,200.00]. xstat tableState2: [registerDate,19900115]. xstat tableState2: ['{products}','Checking Account','Saving Account']. xstat tableState3: [balance,10000.00]. xstat tableState3: [registerDate,20030720]. xstat tableState3: ['{products}','Credit Card']. xstat tableState4: [balance,4000.00]. xstat tableState4: [registerDate,19990203]. xstat tableState4: ['{products}','Checking Account']. xstat tableState5: [balance,5500.00]. xstat tableState5: [registerDate,20050604]. xstat tableState5: ['{products}','Checking Account','Car Loan','Overdraft Protection','Saving Account']. xstat tableState6: [balance,0.00]. xstat tableState6: [registerDate,20090101]. xstat tableState6: ['{products}',null]. xstat tableState7: [balance,1000000.00]. xstat tableState7: [registerDate,20031231]. xstat tableState7: ['{products}','Checking Account','Saving Account']. xstat tableState8: [balance,2500.00]. xstat tableState8: [registerDate,19861106]. xstat tableState8: ['{products}','Checking Account','Credit Card']. xstat tableState9: [balance,0.00]. xstat tableState9: [registerDate,20000101]. xstat tableState9: ['{products}',any]. xstat tableState10: [balance,null]. xstat tableState10: [registerDate,null]. xstat tableState10: ['{products}',null]. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % File generated by HeKatE Qt Editor ver. M6_10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%