Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3355

Problems when writing rhs in Rule API

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    Description

      Description of problem:
      There are several problems when writing rhs of a rule in Rule API:

      • if you omit rhs() you 'nullend' on the end of the rule which results in
        compile error
      • if you put comment in rhs() like rhs("//consequences") you get
        '//consequencesend' which result in compile error as well

      I think there should be line delimiter behind rhs and that if rhs is omitted it
      should result in empty string rather than "null".

      KnowledgeDescr descr = DescrFactory.newPackage().name("org.sample")
      .newRule().name("results in consequencesend")
      .rhs("//consequences")
      .end()

      .newRule().name("results in nullend")
      .lhs()
      .pattern("String").end()
      .end()
      .end()

      .getDescr();

      Attachments

        Activity

          People

            etirelli@redhat.com Edson Tirelli
            etirelli@redhat.com Edson Tirelli
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty