Re: [rules-users] jaxb generated fact loaded into Guvnor throws errors when using the ' is contained in the comma separated list' operator
by rouvas@mm.di.uoa.gr
Sreeram.Vadlamudi(a)wellsfargo.com wrote:
> Hello ,
>
> I am using 5.2.0.CR1 version of Guvnor .
>
> I have a jaxb generated class loaded through the model jar into Guvnor to
> be used as a fact in the Guided Decision Table editor.
>
> When I use a field ACTIVITYCODE of type String from the JAXB generated
> class with ' is contained in the comma separated list' operator, I get
> compilation errors.
>
> Unable to Analyse Expression ACTIVITYCODE == "A" || ACTIVITYCODE == "B":
> [Error: no such identifier: ACTIVITYCODE] [Near : {... ACTIVITYCODE == "A"
> || ACTIVI ....}] ^ [Line: 1, Column: 1]
>
> But when I use equal to operator to compare value to just a string value,
> it compiles fine.
>
> This rule fails.
>
> 3. | rule "Row 1 dds"
> 4. | ruleflow-group "None"
> 5. | dialect "mvel"
> 6. | when
> 7. | factClass : FACTCLASS( ACTIVITYCODE in ("A", "B")
The missing parenthesis is a typo?
-Stathis
> 8. | then
> 9. | factClass.setRATE( "5.25" );
> 10. | end
>
> The below rule compiles fine.
>
>
> 3. | rule "Row 1 dds"
> 4. | ruleflow-group "None"
> 5. | dialect "mvel"
> 6. | when
> 7. | factClass : FACTCLASS ( ACTIVITYCODE =="A")
> 8. | then
> 9. | factClass.setRATE( "5.25" );
> 10. | end
>
> Is this issue being caused by jaxb generated class? If so, is there a way
> to fix this problem?
>
> When I use a regular pojo that is not jaxb generated, the
>
> is contained in the comma separated list' operator works fine.
>
> Can someone provide any direction or thoughts on this?
>
> Thanks,
>
> Ram
>
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
14 years, 8 months
Memory issues
by Jeffrey Schneller
I am currently running version 5.1.0M2. I have 18 different binary
rulesets [packages] that are stored on the local filesystem. The
rulesets range in size from 4K to 131Mb.
When my application starts I load each ruleset into a knowledgeAgent and
store the knowledgeAgent into a hashmap which is stored in memory.
They are loaded using the following xml:
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set.xsd'>
<add>
<resource source='file://PATH_TO_BINARY' type='PKG' />
</add>
</change-set>
The knowledgeAgentConfiguration is setup as:
drools.agent.scanDirectories = false
drools.agent.newInstance = false
drools.agent.scanResources = false
drools.agent.monitorChangeEvents = false
After the all the agents are loaded and stored in the hashmap the total
memory used in the app is 6.2GB.
Once the application is running, if a business user needs to update a
set of rules there is a process in place to refresh all the
knowledgeAgents with new rulesets. In a new thread. the code clears the
hashmap, sets the hashmap to null, calls for garbage collection to
occur, and it then constructs a new hashmap and loads all the rules as
it does at application startup.
The knowledge agent is logging the following when the ruleset is loaded:
KnowledgeAgent applying ChangeSet
KnowledgeAgent performing an incremental build of the ChangeSet
KnowledgeAgent incremental build of KnowledgeBase finished and in use
It takes a large amount of time to do this process [double to triple the
time of application startup]. After this occurs the memory used by the
app increases [to nearly double the original size 12.2GB] and the CPU is
maxed out. After some time the CPU usage drops and the app is usable
again but the memory never decreases. If a business user refreshes the
rules again, the memory increases again and the CPU is maxed out and the
app becomes unresponsive because the memory is completely maxed out.
There is obviously a memory leak somewhere and a large one at that. Is
this the proper way to be caching KnowledgeAgents into memory so the
rulessets don't need to be re-loaded everytime a knowledgeAgent is run?
Is my problem the use of the hashmap? Do I need to remove the original
knowledgeAgents that were in the hashmap?
Thanks for any help.
14 years, 8 months
Migration of Drools 4.0.7 to 5.2.0 version
by Jain, Vaibhav
Hi,
Can anyone please answer the following ?
1. Is Drools 5.2.x backward compatible with drl files syntax of
4.0.7 ?
2. If there any comparison sheet for performance, stability,
features between 5.2 and 4.0.7 ?
3. What are the major challenges in Upgrading Drools from 4.0.x to
Drools 5.2.x ?
Kind Regards,
Vaibhav Jain
----------------------------------------------------------------------
This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited.
Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications (EC) traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law.
The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or free of errors or viruses. Attachments that are part of this EC may have additional important disclosures and disclaimers, which you should read. By messaging with Sender you consent to the foregoing.
14 years, 8 months
drools OSGI bundle for 5.1.1
by Salina Fung/UFL - ICIL
Is it somewhere I can get the OSGI bundle for 5.1.1 or
if I can get a pom.xml somewhere to build one. The zip
file that I downloaded without any pom.xml
Thanks
Salina
14 years, 8 months
how to eval with property inside a nested object
by gmkumar2005
Hi everyone.
I have a BaseProduct with paymentMode as a property
BaseProduct is assigned to a Customer
Customer creates a uProduct. uProduct is a customized product created by the
customer. It contains multiple BaseProducts.
for eg
Music is a Baseproduct with Wire paymentMode
Picture is a product with CreditCard paymentMode
Movie is a product with DebitCard paymentMode
iPod is a uProduct which contains Music and Pictures implies that it
supports Wire and CreditCard
iPad is a uProduct with contains Music, Movies and Pictures implies that it
supports all paymentModes
rule "Non Mandatory"
// calculates all non mandatory fields for display
when
$transaction : Transaction($paymentModes :uProduct.baseProduct)
// select all the paymentModes supported by the uProduct
$displayMode : Property(payMode in $paymentModes)
// select a property which has a valid paymentMode
... someOther conditions ....
then
...
in the above rule $paymentModes returns arrayList of baseProducts. But I
want to access the list of paymentModes. ie, when Transaction has iPod
$paymentMode should return [wire,CreditCard], when Transaction has iPad it
should return [wire,CreditCard,DebitCard]
Question : How do I access array of a selected property which are again part
of Array of an object ?
Any suggestion ?
Thanks a lot.
--
View this message in context: http://drools.46999.n3.nabble.com/how-to-eval-with-property-inside-a-nest...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 8 months
Drools Rule Editor based on Eclipse RCP
by magendo
Would it be possible to build a Drools Rule Editor based on the Eclipse RCP?
I'd like to have an rule editor which works similar to guvnor, but I need to
integrate it into my RCP configuration application. Where should I start in
order to achieve that? Are any similar projects out there? I have read in
different communities about guys who tried to build one, but all those
threads are dead now.
Thanks in advance for helpfull replies :)
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Rule-Editor-based-on-Eclipse-RCP...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 8 months