Re: Weird problem with D2W rules
Re: Weird problem with D2W rules
- Subject: Re: Weird problem with D2W rules
- From: Ramsey Gurley <email@hidden>
- Date: Fri, 29 Mar 2013 14:10:49 -0700
On Mar 29, 2013, at 12:40 PM, Freddie Tilley wrote: Hi,
I'm having a strange issue with a D2w rule.
the left hand side is as follows:
(task = 'edit' and entity.name = 'AMEvent' and object.eventType = '1') with a right hand side key of displayPropertyKeys
I just added object.pickles = '2' to one of my displayPropertyKey rules with no ill effects. The rule failed to fire as expected.
The thing is is that the object.eventType will get called on objects that aren't even AMEvent objects, which will then call the
handleQueryWithUnboundKey of the enterprise object.
This is expected behavior. The rule cache is built using all the values from the LHS. There is no short circuiting like there is in an 'if' statement. There's a catch for UnknownKeyException in ERD2WUtilities.contextValueForKeyNoInferenceNoException.
Even when deleting an object in a list view it throws a java.lang.NullPointerException in EOUtilities.java when handleQueryWithUnboundKey is called on the deleted object.
What is your stack trace? What does deleting an object have to do with the displayPropertyKeys rule?
When debugging the d2w rule it shows the object.eventType as a dependancy even on totally unrelated pages.
Expected behavior.
DEBUG er.directtoweb.rules.displayPropertyKeys.cache (ListAMGroup) - CACHE: displayPropertyKeys for propertyKey: null depends on: ("pageConfiguration", "task", "entity", "object.eventType", "propertyKey")
Even disabling the rule in RuleModeler will still still call object.eventType on the displayPropertyKeys rhs key
CACHE: displayPropertyKeys for propertyKey: null depends on: ("pageConfiguration", "task", "entity", "RuleIsDisabled", "object.eventType", "propertyKey")
Only deleting the rule will prevent the action from being called.
All expected. The idea of the rule is to show certain properties for a certain event type. Any idea how to solve this?
-- Freddie Tilley
Needs more stack traces.
Ramsey
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden