Hi,<br>if your collection is in attribute myCollection, you need getMyColletion/setMyCollection.<br>and then you create a literal = (a,b,c]<br>Depending on which version of Guvnor (5.3 5.4 and 5.5), there is a way to do guided list.<br>
It should work (does for me)<br>Cheers<br>Nicolas<br><br><div class="gmail_quote">2013/1/17 dmoreno <span dir="ltr">&lt;<a href="mailto:josedavidmj-compras@yahoo.es" target="_blank">josedavidmj-compras@yahoo.es</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have imported a POJO model jar in Guvnor. The jar is made up of typical<br>
data transfer objects, with properties accessible through getters and/or<br>
setters.<br>
Some of those properties are collections, only accessible through getters,<br>
and therefore, they can only be modified through the usual collection<br>
methods: add, remove, and so on.<br>
Then I have created some business rules using facts from the imported model.<br>
<br>
What I haven&#39;t found is a way to set up such collection fields in the Given<br>
section of a Test Scenario. Trying to assign a literal value gives the<br>
error:<br>
&quot;Unable to run the scenario.<br>
[Error: could not access/write property …]&quot;<br>
<br>
Does anyone know any way to achieve that goal? Bear in mind that I don&#39;t<br>
have access to the POJO model source code.<br>
<br>
Thanks in advance.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Unable-to-modify-collection-fields-in-Guvnor-Test-Scenarios-tp4021623.html" target="_blank">http://drools.46999.n3.nabble.com/Unable-to-modify-collection-fields-in-Guvnor-Test-Scenarios-tp4021623.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>