Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9211335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:16:16+00:00 2026-06-18T01:16:16+00:00

I am listing my problem here. Persons can enter or exit a room. Person

  • 0

I am listing my problem here.

  1. Persons can enter or exit a room.
  2. Person can be a student or a teacher or HOD.
  3. Students have an attribute called status which can be updated manually as well as automatically.

These are my events:

  1. People entering the room.
  2. Attribute status updated for each student.

These are my rules.

  1. If a person entering a room is Teacher then print teacher entered.
  2. If the number of persons entering the room has gone beyond 30 alert me.
  3. If a student has attended more than 20 hours of the class then update status to complete.

Now I want 1 and 3 combined together.
like:
4. Alert the Teacher if a student who has attribute status complete enters the room.

Now as I told earlier both events come separately. So handling it in 2 different rules was easier. But when I want to create a rule which is a combination of 1 and 3 as in rule 4 then I have to verify if a person enters a room is a student and if he has attribute “complete”.

But, loading the status attribute even before validating if he is a student, sounds bad to me. So, I want to call a method for loading the attribute only if

“a person is a student and there is a rule trying to load the attribute status”.

I am planning to do it by a method call in LHS, which is not straightforward.

Is there any other way, I could handle this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:16:17+00:00Added an answer on June 18, 2026 at 1:16 am

    Having small rules identifying specific situation in most of the times is better than having complex rules trying to identify mixed situations. What is not clear to me is whether your want to replace rule 3 with rule 4 or not. I would leave rule 3 and create rule 4 as follow:

    when
        PersonEnteringRoom($p: person, $r: room, person.type == "Student", person.status == "Complete") // status was set by rule 3.
        Room(this == $r, $t: currentTeacher != null) //the relation could be stablished by rule 1
    then
        Notifier.notify($t, "The student has completed the course", $p);
    end
    

    Of course, whether this rule works for you or not depends in other factors like your execution cycle.

    Hope it helps,

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having quite a weird problem here. I have just pasted the Yii folder
Here is the problem. lets say I have a product category table and a
I have a fairly simple TableViewController listing items that can be checked as they
Here is the page. http://iu91.com/rs/sale/ The right side listing have a mouseover & mouseout
i have got some problem on implementing Django sessions. I have an employee listing
So I'm trying out Problem 7 of Project Euler. By listing the first six
I have problems with how I should structure my product listing pages, products pages,
I have a product listing, in which the title of the product is written.
I am listing students at my web page. I want to list their information
I have a table listing (gameid, playerid, team, max_minions) and I want to get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.