problem with counting available seats in database
OK, I'm struggling with this part of my mule assingment: In case that person has virus symptoms you should put them in hospitals specially made for coronavirus where their capacity isn’t full. When a person goes into a hospital you should handle free spots at the hospital.
so, first I created my mule app, then I put the choice router on the basis of which I decide whether a patient will go to hospital_a, hospital_b or hospital_c. the criterion on the basis of which router decide where a specific patient will go is his id number (if the id is less than 333333333 he will go to hospital_a, if it is less than 666666666 to hospital_b, and if it is greater than that number he will go to hospital_c, which I put in default route). I wrote an expression properly in each of insert database fields and when I test it via arc it shows no errors. I think that part is ok.
Then I created database in mySQL called accounts in which i created three tables, each represent one hospital (hospital_a, hospital_b and hospital_c). I want the maximum number of available seats in each hospital to be 10, and if I try to insert an account when the number of available seats is 0, I want the program to transfer that account to one of the two remaining bases with available seats. if there are no available seats in any of the remaining two, I want it to receive a message, something like "all hospitals are full"
any idea?
Subject
Written By
Posted
problem with counting available seats in database
March 26, 2023 07:51AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.