[rules-users] Need help related to collection of data accessing in rule file.

Pritam infinity2heaven at gmail.com
Fri Dec 4 01:08:47 EST 2009


I have the same problem as I'm trying to create a decision table via excel
where the fact is a root object A where A has a collection B, and B has a
collection C. My rules are based out of the instance A, loop for each object
in B, and within that, loop each object in C. Not sure how I can write an
expression for the same.

>From the examples, I see that one can access a particular element in A by
$a.listname[1] but in my case, I need to access all elements in the loop.

Any suggestions?


prasad raju sagi wrote:
> 
> Hi ,
> 
> I am trying to create rule  on a fact , which contains arraylist of
> collection and the object in the collection internally contains an
> arraylist of another collection of objects.
> 
> This looks like  object A contains collection of objects B and B contains
> collection object C
> 
> A ->  blist ( Arraylist )
> 
> B -> clist (ArrayList<C> )
> 
> C-> dlist( ArrayList<D>)
> 
> D-> type ( string)
> 
> I am inseting A as fact to the working memory.
> 
> I am in confusion state like how to write the rule to place conditions  on
> collection C. 
> 
> Can I use from in the form of nested from in rule statment.
> Thanks
> Prasad Raju Sagi
> Mobile: 847-644-4103 
> 
> 
> 
> 
> ________________________________
> From: Aziz Boxwala <boxwala at yahoo.com>
> To: rules-users at lists.jboss.org
> Sent: Thursday, June 11, 2009 1:58:28 PM
> Subject: [rules-users] process order example not working fully
> 
> 
> I am trying to execute a ruleflow and use rules to assign tasks within the
> ruleflow in Drools 5.0.1. I have a drl file included in my knowledge base
> that tries to assign a task to a user when a new human task is created.
> This is based on the example in org.drools.example.process.order. I can't
> get my code to work. I don't the rules in the example are working either
> (dslr for the task assignment or the drl for dynamic logging). After some
> attempts, I found that this condition 
>     WorkItemNodeInstance()
> does not evaluate to true ever.
> 
> Do I have to do anything special to make the WorkItemNodeInstance appear
> in working memory?
> 
> Thanks for any help.
> 
> --Aziz
> 
> 
> 
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> 

-- 
View this message in context: http://n3.nabble.com/Re-Need-help-related-to-collection-of-data-accessing-in-rule-file-tp60311p67858.html
Sent from the Drools - User mailing list archive at Nabble.com.




More information about the rules-users mailing list