In my limited experience, I'm not sure you can do this in decision tables, but given the flexibility of Drools there may be a way, but I'm not sure this is a good thing. <div><br></div><div>I suspect the rules you create will be really ugly and not support your longer term goals of flexibility. It might be better to transform your data into a better fact model that gives you the ability to create real business rules that are understandable.</div>
<div><br></div><div>It appears that it is better to create a fact model that is more shallow and uses almost relational concepts to relate the facts together rather than a deeply nested model (I suspect you are getting this from some really ugly xml structure). So whilst it's a pain, I would reconsider your core domain/fact model.<br>
<br><div class="gmail_quote">On Fri, Dec 4, 2009 at 4:08 PM, Pritam <span dir="ltr"><<a href="mailto:infinity2heaven@gmail.com">infinity2heaven@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
I have the same problem as I'm trying to create a decision table via excel<br>
where the fact is a root object A where A has a collection B, and B has a<br>
collection C. My rules are based out of the instance A, loop for each object<br>
in B, and within that, loop each object in C. Not sure how I can write an<br>
expression for the same.<br>
<br>
>From the examples, I see that one can access a particular element in A by<br>
$a.listname[1] but in my case, I need to access all elements in the loop.<br>
<br>
Any suggestions?<br>
<br>
<br>
prasad raju sagi wrote:<br>
><br>
> Hi ,<br>
><br>
> I am trying to create rule on a fact , which contains arraylist of<br>
> collection and the object in the collection internally contains an<br>
> arraylist of another collection of objects.<br>
><br>
> This looks like object A contains collection of objects B and B contains<br>
> collection object C<br>
><br>
> A -> blist ( Arraylist )<br>
><br>
> B -> clist (ArrayList<C> )<br>
><br>
> C-> dlist( ArrayList<D>)<br>
><br>
> D-> type ( string)<br>
><br>
> I am inseting A as fact to the working memory.<br>
><br>
> I am in confusion state like how to write the rule to place conditions on<br>
> collection C.<br>
><br>
> Can I use from in the form of nested from in rule statment.<br>
> Thanks<br>
> Prasad Raju Sagi<br>
> Mobile: 847-644-4103<br>
><br>
><br>
><br>
><br>
> ________________________________<br>
> From: Aziz Boxwala <<a href="mailto:boxwala@yahoo.com">boxwala@yahoo.com</a>><br>
> To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
> Sent: Thursday, June 11, 2009 1:58:28 PM<br>
> Subject: [rules-users] process order example not working fully<br>
><br>
><br>
> I am trying to execute a ruleflow and use rules to assign tasks within the<br>
> ruleflow in Drools 5.0.1. I have a drl file included in my knowledge base<br>
> that tries to assign a task to a user when a new human task is created.<br>
> This is based on the example in org.drools.example.process.order. I can't<br>
> get my code to work. I don't the rules in the example are working either<br>
> (dslr for the task assignment or the drl for dynamic logging). After some<br>
> attempts, I found that this condition<br>
> WorkItemNodeInstance()<br>
> does not evaluate to true ever.<br>
><br>
> Do I have to do anything special to make the WorkItemNodeInstance appear<br>
> in working memory?<br>
><br>
> Thanks for any help.<br>
><br>
> --Aziz<br>
><br>
><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>
><br>
><br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://n3.nabble.com/Re-Need-help-related-to-collection-of-data-accessing-in-rule-file-tp60311p67858.html" target="_blank">http://n3.nabble.com/Re-Need-help-related-to-collection-of-data-accessing-in-rule-file-tp60311p67858.html</a><br>
Sent from the Drools - User 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>
</font></blockquote></div><br></div>