Skip to content

DSL for situation definition #4

@pereirazc

Description

@pereirazc

A straightforward dialect for situation writing/designing to be transpiled at runtime into drl rules.

The so-famous Fever situation could be described like:

package br.ufes.lprm.scene.examples.fever

situation Fever
  when
    @febrile: Person(temperature > 37)
end
  • The situation keyword would refer to a special kind of rule with no need for an explicit consequence (RHS) which would always be internal situation life cycle management code.
  • There would be no need for a static SituationType-descendant Java class. The situation declaration provides enough information for building the situation class dynamically. The @<label> construct would represent that the binding variable maps to a class attribute <label> as a situation role.

short-term downfalls:

  • situation only file: domain rules and events would be written apart from the situations, although, defined situations could be used by any domain business rule.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions