Uploaded image for project: 'JBoss BPMS Platform'
  1. JBoss BPMS Platform
  2. RHBPMS-4045

[GSS](6.3.z) Rules are not executed when process is executed in business-central

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 6.3.2, 6.3.2.GA
    • 6.3.0.GA
    • Business Central
    • None
    • CR1
    • Hide

      Follow the instructions from the attached reproducer.

      Show
      Follow the instructions from the attached reproducer.

      I have created a process that contains a sequence with a drools condition expression. This is working as expected.

      I then have a business rules task later in the process that has one object as a data input. This object is of type TestObject (included in the attached example) which contains a list of TestObject. The rules that are relevant to the business rules task are as follows:

      rule 'a'
      ruleflow-group 'test-rules'
      when
          $obj : TestObject( $str : strings )
          $s : TestObject() from $str
      then
          System.out.println( "a: " + $s );
      end
      
      rule 'b'
      ruleflow-group 'test-rules'
      when
          $obj : TestObject( $str : strings )
          $s : Object() from $str
      then
          System.out.println( "b: " + $s );
      end
      

      I expect both rules to fire twice (once for each element in the list). However, only the 2nd rule (rule b) fires. This is especially unexpected since the output suggests that $s is in fact of type TestObject. Output:

      15:24:26,445 INFO  [stdout] (http-0.0.0.0:8080-7) found
      15:24:26,448 INFO  [stdout] (http-0.0.0.0:8080-7) b: com.sample.testproject.TestObject@4cc89b3
      15:24:26,448 INFO  [stdout] (http-0.0.0.0:8080-7) b: com.sample.testproject.TestObject@cfdf63b
      

      If the same process is executed outside of business-central, then both rules fire as expected.

      If I remove the sequence with the drools condition (or alternately, change it to be a java condition), both rules fire as expected. Output:

      15:34:29,270 INFO  [stdout] (http-0.0.0.0:8080-9) found
      15:34:29,273 INFO  [stdout] (http-0.0.0.0:8080-9) a: com.sample.testproject.TestObject@13925805
      15:34:29,274 INFO  [stdout] (http-0.0.0.0:8080-9) a: com.sample.testproject.TestObject@6031ace2
      15:34:29,275 INFO  [stdout] (http-0.0.0.0:8080-9) b: com.sample.testproject.TestObject@13925805
      15:34:29,275 INFO  [stdout] (http-0.0.0.0:8080-9) b: com.sample.testproject.TestObject@6031ace2
      

              mfusco@redhat.com Mario Fusco
              rhn-support-mputz Martin Weiler (Inactive)
              Marek Winkler Marek Winkler (Inactive)
              Marek Winkler Marek Winkler (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: