Hi I am currently working on a project in work using Flex. I am not too good with the prolog language.
I have to develop a troubleshooting program for a computer system. I have developed a sample code to see how it works, the problem i have is when it finds one outcome, it then goes back and fires other rules.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Questions %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
question your_name
Please enter your name ; % question text to be displayed
input name.
question problem_report
is the problem?;
choose from sage, outlook, office.
question sage_prob
What is the sage problem?;
choose from slow, froze, locked_out.
question outlook_prob
What is the Outlook error?;
choose from login_error, attachments, nonreceived_emails.
question office_prob
What is the Office error?;
choose from excel, word, access.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% RULESET %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ruleset identify
contains all rules;
update ruleset by removing each selected rule .
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Sage Rules %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
rule sage1
if problem_report is sage
then do ask sage_prob.
rule sage2
if sage_prob is slow
then echo ( your_name ,'Dont not close the file, contact IT support').
rule sage3
if sage_prob is froze
then echo ('Dont not close the file, contact IT support').
rule sage4
if sage_prob is locked_out
then echo ('Contact IT with the name of the locked file and user').
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Outlook Rules %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
rule outlook1
if problem_report is outlook
then do ask outlook_prob.
rule outlook2
if outlook_prob is login_error
then echo ('Has your password expired? log out and in and change password if asked.').
rule outlook3
if outlook_prob is attachments
then echo('Contact IT Support eith your VNC# as EAS needs repaired').
rule outlook4
if outlook_prob is nonreceived_emails
then echo (' Email IT with details of email, including to / from / date').
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Office Rules %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
rule office1
if problem_report is office
then do ask office_prob.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Action %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
action run;
do ask your_name
and invoke ruleset identify
and nl .
Can anyone advise me where I am going wrong in this matter?
Thanks in advance
I have to develop a troubleshooting program for a computer system. I have developed a sample code to see how it works, the problem i have is when it finds one outcome, it then goes back and fires other rules.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Questions %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
question your_name
Please enter your name ; % question text to be displayed
input name.
question problem_report
is the problem?;
choose from sage, outlook, office.
question sage_prob
What is the sage problem?;
choose from slow, froze, locked_out.
question outlook_prob
What is the Outlook error?;
choose from login_error, attachments, nonreceived_emails.
question office_prob
What is the Office error?;
choose from excel, word, access.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% RULESET %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ruleset identify
contains all rules;
update ruleset by removing each selected rule .
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Sage Rules %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
rule sage1
if problem_report is sage
then do ask sage_prob.
rule sage2
if sage_prob is slow
then echo ( your_name ,'Dont not close the file, contact IT support').
rule sage3
if sage_prob is froze
then echo ('Dont not close the file, contact IT support').
rule sage4
if sage_prob is locked_out
then echo ('Contact IT with the name of the locked file and user').
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Outlook Rules %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
rule outlook1
if problem_report is outlook
then do ask outlook_prob.
rule outlook2
if outlook_prob is login_error
then echo ('Has your password expired? log out and in and change password if asked.').
rule outlook3
if outlook_prob is attachments
then echo('Contact IT Support eith your VNC# as EAS needs repaired').
rule outlook4
if outlook_prob is nonreceived_emails
then echo (' Email IT with details of email, including to / from / date').
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Office Rules %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
rule office1
if problem_report is office
then do ask office_prob.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Action %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
action run;
do ask your_name
and invoke ruleset identify
and nl .
Can anyone advise me where I am going wrong in this matter?
Thanks in advance