[
https://issues.jboss.org/browse/DROOLS-691?page=com.atlassian.jira.plugin...
]
Rares Vernica commented on DROOLS-691:
--------------------------------------
The bug seems to be triggering when there is a rule that matches the GIVEN facts and the
rule creates a new Goz.
Workflow Test Scenario error: org.foo.Bar cannot be cast to
org.foo.Bar
-----------------------------------------------------------------------
Key: DROOLS-691
URL:
https://issues.jboss.org/browse/DROOLS-691
Project: Drools
Issue Type: Bug
Affects Versions: 6.1.0.Final
Reporter: Rares Vernica
Assignee: Mark Proctor
This is a bug with Workflow Test Scenario. I have two types:
org.foo.Bar
goz
org.foo.Goz
g1
g2
Bar has a member of type Goz called goz. Goz has two members g1 and g2 which have
predefined values in an enumeration and g2 depends on the value of g1. I have a rule using
them and the rule is fine.
The problem is when I create a Test Scenario using them. The scenario has Goz and a Bar
in the GIVEN section. Both are blinded to variable names and the goz member of Bar is
initialized with the Goz instance.
I first create Goz in the GIVEN section. I add g1 and g2 and assign literal values to
them.
Then I create Bar in the given section as well. Without any further changes I "Run
scenario" and I get:
Reporting:
There were test failures
Text
Test : org.foo.Bar cannot be cast to org.foo.Bar
It might be relate to DROOLS-689 which I reported earlier.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)