-
Bug
-
Resolution: Done
-
Critical
-
6.x.x
-
None
-
-
-
-
-
-
DR2
-
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
- is caused by
-
DROOLS-1219 ClassObjectTypes are not all correctly rewired during a packages merge
- Closed
- is cloned by
-
RHBPMS-4045 [GSS](6.3.z) Rules are not executed when process is executed in business-central
- Verified