Uploaded image for project: 'Guvnor'
  1. Guvnor
  2. GUVNOR-814

Functions do not get added to new BRMS package when package imported from drl file

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: drools-4.0.1
    • Fix Version/s: drools-4.0.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      BRMS running on Windows XP SP2, with JBoss 4.2GA

      Description

      When you create a new package in the BRMS by importing an existing DRL file then any functions in the DRL file do not get added to the list of functions for the newly created package. Instead, the functions appear along with the import statements in the "header" text box found when you click on "Edit Package configuration" for the new package!

      To recreate:

      Put the example rules below into a .drl file and import it into the BRMS by creating a new package and choosng the option to load it from a .drl file.

      Click on the newly created package com.acme.example in the package browser. Click on the Functions tab for the package. No functions are present.

      Click on com.acme.example in the package browser and then select "Edit Package configuration". In the Header text box you should see the two functions defined in the example DRL file given below.

      package com.acme.example

      import java.util.Set;

      function int firstFunction ()
      {
      return 1;
      }

      function int secondFunction ()
      {
      return 2;
      }

      rule "Rule 1"
      when
      eval(firstFunction() == 1)
      then
      System.out.println("Function 1");
      end

      rule "Rule 2"
      when
      eval(secondFunction() == 2)
      then
      System.out.println("Function 2");
      End

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                michaelneale Michael Neale
                Reporter:
                shahad Shahad Ahmed
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: