For below JSON, later mention drl syntax should suffice (Although haven't tested running drl but correction would be welcome)
{
"category": [
{
"nlp": [
{
"mainCategory": "General"
}
],
"crawler":
{
"isNLP": true,
"mainCategory": "General"
}
}
],
"uniqueId": "5695d7dae4b047806242cfbc0"
}
Drl Rule for testing "category.nlp.mainCategory" as "General" below:
When
$basePojo: BasePojo($categoryList:category)
$catgory : Category($nlpList: nlp) from $categoryList
$nlp : Nlp(mainCategory=="General") from $nlpList
Then
System.out.println("Document verfied");
Question: How do I use drools fluent Java API to write the above drl for "category.nlp.mainCategory" iteration?
I saw some helpful discussion on StackOverflow discussing drools Java API to write drl rules as here
http://docs.jboss.org/drools/release/5.2.0.Final/droolsjbpm-introduction-docs/html/ch02.html#d0e124
which creates few straight constraints in above official documentation.