Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-1075

kie-spring component does not execute batch commands

    XMLWordPrintable

    Details

    • Steps to Reproduce:
      Hide

      1. Create a rule that uses a global variable.
      2. Define the ksession within the application-context.xml config of your app.
      3. References the global as a bean that you creates in the application-context.xml as well.
      4. Execute the test checking if the instance of the global is null in the rule.

      Show
      1. Create a rule that uses a global variable. 2. Define the ksession within the application-context.xml config of your app. 3. References the global as a bean that you creates in the application-context.xml as well. 4. Execute the test checking if the instance of the global is null in the rule.
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      When defining any type of bean inside the tag kie:batch, seems that nothing gets executed. I added a reference to a bean to be identified by a global variable in a rule and this global always get null.

      this is an example of configuration:
      <kie:batch>
      <kie:set-global identifier="droolsCamelHelper">
      <bean class="com.redhat.gpe.coursecompletion.util.DroolsCamelHelper"/>
      </kie:set-global>
      </kie:batch>

      Also looking to the tests in the kie-spring component source code the list is define in the configurations as follows:

      https://github.com/droolsjbpm/droolsjbpm-integration/blob/953263b9f6bf7f9fe1df8d984a110d68fd148676/kie-spring/src/test/resources/org/kie/spring/beans-commands.xml#L35

      But the rule tests if it's null:
      https://github.com/droolsjbpm/droolsjbpm-integration/blob/953263b9f6bf7f9fe1df8d984a110d68fd148676/kie-spring/src/test/resources/drl_kiesample/Hal1.drl#L39-L41

      So this error never raises.

        Attachments

          Activity

            People

            Assignee:
            mfusco Mario Fusco
            Reporter:
            samueltauil Samuel Tauil
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: