| A continued example based on http://www.parlezuml.com/tutorials/ocl/index_files/frame.htm | | Here we can test whether someone is married to two different people, and we can annul marriages other than Fred-Mary . | You can run these rules in a browser, using the Internet Business Logic system | at www.reengineeringllc.com some-person1 who is male and some-person2 who is female could get married add : that-person1 is married to that-person2 -------------------------------------------------------------------------------------------------------------------------- change the database to show that that-person1 and that-person2 are married ( pick a man then a woman from the menus first ) the gender of some-person1 is male not : that-person1 is married the gender of some-person2 is female not : that-person2 is married ------------------------------------------------------------------------- that-person1 who is male and that-person2 who is female could get married some-person is married to some-other-person -------------------------------------------- that-person is married some-other-person is married to some-person -------------------------------------------- that-person is married some-person is married to some-person1 that-person is married to some-person2 that-person1 and that-person2 are different ------------------------------------------------------- ALERT -- that-person is married to two different people some-person1 is married to some-person some-person2 is married to some-person that-person1 and that-person2 are different ------------------------------------------------------- ALERT -- that-person is married to two different people some-person1-name is not equal some-person2-name ------------------------------------------------------ that-person1-name and that-person2-name are different some-person1-name is married to some-person2-name that-person1-name and Fred are different that-person2-name and Mary are different del : that-person1-name is married to that-person2-name -------------------------------------------------------------------------------------- anull the marriage of that-person1-name to that-person2-name (except for Fred -- Mary) this-person1-name is married to this-person2-name ================================================== Fred Mary the gender of this-person is this-gender ========================================= Fred male John male Martin male Gary male Mary female Jane female Liza female Gloria female