Hello,<br>which version of Guvnor do you use ?<br>Regards<br>Nicolas Héron<br><br><div class="gmail_quote">2012/5/21 benfro [via Drools] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=4004857&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
        Hi
<br><br>We have a fact model object according to
<br><br></div><pre>public class RuleAnalysisResult implements Serializable {
private static final long serialVersionUID = 1L;
private static final Logger LOGGER = Logger.getLogger(RuleAnalysisResult.class);
private String value;
private String definitionCode;
private List<RuleAnalysisResult> elements = new ArrayList<RuleAnalysisResult>();
public RuleAnalysisResult() {
}
/**
* Drools needs this one
*/
public RuleAnalysisResult(String value, String definitionCode) {
this.value = value;
this.definitionCode = definitionCode;
}
public RuleAnalysisResult(String value, String definitionCode, RuleAnalysisResult... results) {
this.value = value;
this.definitionCode = definitionCode;
if (results != null) {
elements.addAll(Arrays.asList(results));
}
}
public String getDefinitionCode() {
return definitionCode;
}
public void setDefinitionCode(String definitionCode) {
this.definitionCode = definitionCode;
}
public void addElement(RuleAnalysisResult... result) {
elements.addAll(Arrays.asList(result));
}
public List<RuleAnalysisResult> getElements() {
return elements;
}
public void setElements(List<RuleAnalysisResult> elements) {
this.elements = elements;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public int getElementSize() {
return elements.size();
}
public int getIntValue() {
LOGGER.info(value);
return Integer.parseInt(value);
}
public double getDoubleValue() {
LOGGER.info(value);
return Double.parseDouble(value);
}
}</pre><div class="im"><br>When using Guvnor we try (in vain) to add elements to its List of children according to
<br><br></div><img src="" border="0"><div class="im"><br><br>This result in errors running the test scenario.
<br><br></div><img src="" border="0"><div class="im"><br><br>Anybody recognize this? Is this not the way to insert elements in a fact's collection?
<br><br>Sincerely
<br><br>benfro
<br>
        
        <br>
        <br>
        </div><hr color="#cccccc" noshade size="1">
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://drools.46999.n3.nabble.com/Guvnor-will-not-let-you-add-elements-to-List-in-fact-object-tp4004819.html" target="_blank" rel="nofollow" link="external">http://drools.46999.n3.nabble.com/Guvnor-will-not-let-you-add-elements-to-List-in-fact-object-tp4004819.html</a>
        </div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                
                To unsubscribe from Drools, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>
                <a href="http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
        </div></blockquote></div><br>
        <div class="signature weak-color">Nicolas Héron</div>
<br/><hr align="left" width="300" />
View this message in context: <a href="http://drools.46999.n3.nabble.com/Guvnor-will-not-let-you-add-elements-to-List-in-fact-object-tp4004819p4004857.html">Re: Guvnor - will not let you add elements to List in fact object</a><br/>
Sent from the <a href="http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html">Drools: User forum mailing list archive</a> at Nabble.com.<br/>