title: Drools rule to find out the max value from a list of objects' list of objects
body: <p>I know how easy it is to write a Drools rule to find the max value from a list of objects</p>
  
  <pre><code>e.g. MyBase(listOfObjects : myObjects)
       accumulate (MyObject($value : value, $value != null) from listOfObjects; $maxValue : max($value))
  </code></pre>
  
  <p>My question is, how do you write a Drools rule to find the max value from a list of objects' list of objects?</p>
  
  <pre><code>e.g. MyBase(listOfObjects : myObjects)
       accumulate (MyObject(anotherListOfObjects : mySmallerObjects) from listOfObjects
                   ,MySmallerObject($value : value, $value != null) from anotherListOfObjects; $maxValue : max($value))
  </code></pre>
  
  <p>The above doesn't work.</p>
  
  <p>So basically, I have an object MyBase, which has <code>List&lt;MyObjects&gt; myObjects</code>. Within <code>myObjects</code>, I want to find the max value from their <code>List&lt;MySmallerObject&gt; mySmallerObjects</code> (across all the <code>myObjects</code>, not just within <code>mySmallerObjects</code>)</p>
  
  <p>I believe it is doable in Drools, I just need to get the syntax right.</p>
  
  <p>I am using Drools version 5.5, thank you!</p>