Question about EECAs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about EECAs

Ruth Hoffman-2
Hi All:
Are Entity ECAs handled by the Entity Engine exclusively?
TIA
Ruth
Reply | Threaded
Open this post in threaded view
|

Re: Question about EECAs

BJ Freeman

this should help.
http://ci.apache.org/projects/ofbiz/site/javadocs/org/ofbiz/entity/eca/EntityEcaHandler.html

=========================
BJ Freeman
http://bjfreeman.elance.com
Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=93>
Specialtymarket.com <http://www.specialtymarket.com/>

Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man
Linkedin
<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>


Ruth Hoffman sent the following on 3/24/2010 1:40 PM:
> Hi All:
> Are Entity ECAs handled by the Entity Engine exclusively?
> TIA
> Ruth
>


Reply | Threaded
Open this post in threaded view
|

Re: Question about EECAs

Ruth Hoffman-2
Hi BJ:
Thanks. So does this mean that EECAs work as follows?:
1) A GenericDelegator object is gotten by the calling program
2) The GenericDelegator code looks to see if any EECAs are defined for
the given Entity using the DelegatorEcaHandler
3) If any EECAs are defined for the Entity, those conditions are
evaluated and any actions are run
4) Program control passes back to the GenericDelegator
4) The GenericDelegator does whatever it was called to do
5) Program control returns to the caller

TIA
Ruth

BJ Freeman wrote:

> this should help.
> http://ci.apache.org/projects/ofbiz/site/javadocs/org/ofbiz/entity/eca/EntityEcaHandler.html
>
> =========================
> BJ Freeman
> http://bjfreeman.elance.com
> Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=93>
> Specialtymarket.com <http://www.specialtymarket.com/>
>
> Systems Integrator-- Glad to Assist
>
> Chat  Y! messenger: bjfr33man
> Linkedin
> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>
>
> Ruth Hoffman sent the following on 3/24/2010 1:40 PM:
>  
>> Hi All:
>> Are Entity ECAs handled by the Entity Engine exclusively?
>> TIA
>> Ruth
>>
>>    
>
>
>
>  
Reply | Threaded
Open this post in threaded view
|

Re: Question about EECAs

Adam Heath-2
Ruth Hoffman wrote:

> Hi BJ:
> Thanks. So does this mean that EECAs work as follows?:
> 1) A GenericDelegator object is gotten by the calling program
> 2) The GenericDelegator code looks to see if any EECAs are defined for
> the given Entity using the DelegatorEcaHandler
> 3) If any EECAs are defined for the Entity, those conditions are
> evaluated and any actions are run
> 4) Program control passes back to the GenericDelegator
> 4) The GenericDelegator does whatever it was called to do
> 5) Program control returns to the caller

More complex.

Before database save, after database save, before/after cache put,
before/after key looking, list lookup, etc.  Lots of events are watchable.
Reply | Threaded
Open this post in threaded view
|

Re: Question about EECAs

Scott Gray-2
On 24/03/2010, at 5:24 PM, Adam Heath wrote:

> Ruth Hoffman wrote:
>> Hi BJ:
>> Thanks. So does this mean that EECAs work as follows?:
>> 1) A GenericDelegator object is gotten by the calling program
>> 2) The GenericDelegator code looks to see if any EECAs are defined for
>> the given Entity using the DelegatorEcaHandler
>> 3) If any EECAs are defined for the Entity, those conditions are
>> evaluated and any actions are run
>> 4) Program control passes back to the GenericDelegator
>> 4) The GenericDelegator does whatever it was called to do
>> 5) Program control returns to the caller
>
> More complex.
>
> Before database save, after database save, before/after cache put,
> before/after key looking, list lookup, etc.  Lots of events are watchable.
Yeah so basically steps 2, 3 and 4(1) will happen at some point within the execution of 4(2) depending on the event type defined on the EECA

Regards
Scott

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Question about EECAs

Wickersheimer Jeremy
In reply to this post by Adam Heath-2
Note that it seems delegator.storeAll does not trigger the EECAs, unlike delegator.store
There a jira opened fir it but no patch atm.

--
Wickersheimer Jeremy
On Thursday 25 March 2010 07:24:06 Adam Heath wrote:

> Ruth Hoffman wrote:
> > Hi BJ:
> > Thanks. So does this mean that EECAs work as follows?:
> > 1) A GenericDelegator object is gotten by the calling program
> > 2) The GenericDelegator code looks to see if any EECAs are defined for
> > the given Entity using the DelegatorEcaHandler
> > 3) If any EECAs are defined for the Entity, those conditions are
> > evaluated and any actions are run
> > 4) Program control passes back to the GenericDelegator
> > 4) The GenericDelegator does whatever it was called to do
> > 5) Program control returns to the caller
>
> More complex.
>
> Before database save, after database save, before/after cache put,
> before/after key looking, list lookup, etc.  Lots of events are watchable.
Reply | Threaded
Open this post in threaded view
|

Re: Question about EECAs

Ruth Hoffman-2
In reply to this post by Adam Heath-2
Hi Adam, Scott, Jeremy:
Thanks.
That is exactly what I wanted to know.
Ruth

Adam Heath wrote:

> Ruth Hoffman wrote:
>  
>> Hi BJ:
>> Thanks. So does this mean that EECAs work as follows?:
>> 1) A GenericDelegator object is gotten by the calling program
>> 2) The GenericDelegator code looks to see if any EECAs are defined for
>> the given Entity using the DelegatorEcaHandler
>> 3) If any EECAs are defined for the Entity, those conditions are
>> evaluated and any actions are run
>> 4) Program control passes back to the GenericDelegator
>> 4) The GenericDelegator does whatever it was called to do
>> 5) Program control returns to the caller
>>    
>
> More complex.
>
> Before database save, after database save, before/after cache put,
> before/after key looking, list lookup, etc.  Lots of events are watchable.
>
>  
Reply | Threaded
Open this post in threaded view
|

Re: Question about EECAs

Scott Gray-2
In reply to this post by Wickersheimer Jeremy
Hi Jeremy (is this your last name or first?)

storeAll calls either store or create so doesn't that imply that it does everything that they do?

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 24/03/2010, at 5:30 PM, Wickersheimer Jeremy wrote:

> Note that it seems delegator.storeAll does not trigger the EECAs, unlike delegator.store
> There a jira opened fir it but no patch atm.
>
> --
> Wickersheimer Jeremy
> On Thursday 25 March 2010 07:24:06 Adam Heath wrote:
>> Ruth Hoffman wrote:
>>> Hi BJ:
>>> Thanks. So does this mean that EECAs work as follows?:
>>> 1) A GenericDelegator object is gotten by the calling program
>>> 2) The GenericDelegator code looks to see if any EECAs are defined for
>>> the given Entity using the DelegatorEcaHandler
>>> 3) If any EECAs are defined for the Entity, those conditions are
>>> evaluated and any actions are run
>>> 4) Program control passes back to the GenericDelegator
>>> 4) The GenericDelegator does whatever it was called to do
>>> 5) Program control returns to the caller
>>
>> More complex.
>>
>> Before database save, after database save, before/after cache put,
>> before/after key looking, list lookup, etc.  Lots of events are watchable.


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Question about EECAs

BJ Freeman
In reply to this post by Ruth Hoffman-2
 here is the xsd that calls out the events
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/dtd/entity-eca.xsd?revision=763175&view=markup
here is a working example.
 http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/eecas.xml?view=markup



=========================
BJ Freeman
http://bjfreeman.elance.com
Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=93>
Specialtymarket.com <http://www.specialtymarket.com/>

Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man
Linkedin
<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>


BJ Freeman sent the following on 3/24/2010 2:34 PM:

> this should help.
> http://ci.apache.org/projects/ofbiz/site/javadocs/org/ofbiz/entity/eca/EntityEcaHandler.html
>
> =========================
> BJ Freeman
> http://bjfreeman.elance.com
> Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=93>
> Specialtymarket.com <http://www.specialtymarket.com/>
>
> Systems Integrator-- Glad to Assist
>
> Chat  Y! messenger: bjfr33man
> Linkedin
> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>
>
>
> Ruth Hoffman sent the following on 3/24/2010 1:40 PM:
>> Hi All:
>> Are Entity ECAs handled by the Entity Engine exclusively?
>> TIA
>> Ruth
>>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Question about EECAs

Wickersheimer Jeremy
In reply to this post by Scott Gray-2
I just know i ran into this problem, and i replaced storeAll by a loop which call store on
each entity for it to work.
You can look for the JIRA which has the exact code used.
--
Wickersheimer Jeremy
On Thursday 25 March 2010 07:38:19 Scott Gray wrote:

> Hi Jeremy (is this your last name or first?)
>
> storeAll calls either store or create so doesn't that imply that it does
> everything that they do?
>
> Regards
> Scott
>
> HotWax Media
> http://www.hotwaxmedia.com
>
> On 24/03/2010, at 5:30 PM, Wickersheimer Jeremy wrote:
> > Note that it seems delegator.storeAll does not trigger the EECAs, unlike
> > delegator.store There a jira opened fir it but no patch atm.
> >
> >> Ruth Hoffman wrote:
> >>> Hi BJ:
> >>> Thanks. So does this mean that EECAs work as follows?:
> >>> 1) A GenericDelegator object is gotten by the calling program
> >>> 2) The GenericDelegator code looks to see if any EECAs are defined for
> >>> the given Entity using the DelegatorEcaHandler
> >>> 3) If any EECAs are defined for the Entity, those conditions are
> >>> evaluated and any actions are run
> >>> 4) Program control passes back to the GenericDelegator
> >>> 4) The GenericDelegator does whatever it was called to do
> >>> 5) Program control returns to the caller
> >>
> >> More complex.
> >>
> >> Before database save, after database save, before/after cache put,
> >> before/after key looking, list lookup, etc.  Lots of events are
> >> watchable.
Reply | Threaded
Open this post in threaded view
|

Re: Question about EECAs

Scott Gray-2
The jira issue is talking about removeAll not storeAll (https://issues.apache.org/jira/browse/OFBIZ-3554)

Regards
Scott

On 24/03/2010, at 5:51 PM, Wickersheimer Jeremy wrote:

> I just know i ran into this problem, and i replaced storeAll by a loop which call store on
> each entity for it to work.
> You can look for the JIRA which has the exact code used.
> --
> Wickersheimer Jeremy
> On Thursday 25 March 2010 07:38:19 Scott Gray wrote:
>> Hi Jeremy (is this your last name or first?)
>>
>> storeAll calls either store or create so doesn't that imply that it does
>> everything that they do?
>>
>> Regards
>> Scott
>>
>> HotWax Media
>> http://www.hotwaxmedia.com
>>
>> On 24/03/2010, at 5:30 PM, Wickersheimer Jeremy wrote:
>>> Note that it seems delegator.storeAll does not trigger the EECAs, unlike
>>> delegator.store There a jira opened fir it but no patch atm.
>>>
>>>> Ruth Hoffman wrote:
>>>>> Hi BJ:
>>>>> Thanks. So does this mean that EECAs work as follows?:
>>>>> 1) A GenericDelegator object is gotten by the calling program
>>>>> 2) The GenericDelegator code looks to see if any EECAs are defined for
>>>>> the given Entity using the DelegatorEcaHandler
>>>>> 3) If any EECAs are defined for the Entity, those conditions are
>>>>> evaluated and any actions are run
>>>>> 4) Program control passes back to the GenericDelegator
>>>>> 4) The GenericDelegator does whatever it was called to do
>>>>> 5) Program control returns to the caller
>>>>
>>>> More complex.
>>>>
>>>> Before database save, after database save, before/after cache put,
>>>> before/after key looking, list lookup, etc.  Lots of events are
>>>> watchable.


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Question about EECAs

Scott Gray-2
But yes you are correct, removeAll results in a DELETE FROM [TABLE] WHERE ... so the delegator has no way of knowing what is being removed, this would effect the cache as well.

Regards
Scott

On 24/03/2010, at 5:58 PM, Scott Gray wrote:

> The jira issue is talking about removeAll not storeAll (https://issues.apache.org/jira/browse/OFBIZ-3554)
>
> Regards
> Scott
>
> On 24/03/2010, at 5:51 PM, Wickersheimer Jeremy wrote:
>
>> I just know i ran into this problem, and i replaced storeAll by a loop which call store on
>> each entity for it to work.
>> You can look for the JIRA which has the exact code used.
>> --
>> Wickersheimer Jeremy
>> On Thursday 25 March 2010 07:38:19 Scott Gray wrote:
>>> Hi Jeremy (is this your last name or first?)
>>>
>>> storeAll calls either store or create so doesn't that imply that it does
>>> everything that they do?
>>>
>>> Regards
>>> Scott
>>>
>>> HotWax Media
>>> http://www.hotwaxmedia.com
>>>
>>> On 24/03/2010, at 5:30 PM, Wickersheimer Jeremy wrote:
>>>> Note that it seems delegator.storeAll does not trigger the EECAs, unlike
>>>> delegator.store There a jira opened fir it but no patch atm.
>>>>
>>>>> Ruth Hoffman wrote:
>>>>>> Hi BJ:
>>>>>> Thanks. So does this mean that EECAs work as follows?:
>>>>>> 1) A GenericDelegator object is gotten by the calling program
>>>>>> 2) The GenericDelegator code looks to see if any EECAs are defined for
>>>>>> the given Entity using the DelegatorEcaHandler
>>>>>> 3) If any EECAs are defined for the Entity, those conditions are
>>>>>> evaluated and any actions are run
>>>>>> 4) Program control passes back to the GenericDelegator
>>>>>> 4) The GenericDelegator does whatever it was called to do
>>>>>> 5) Program control returns to the caller
>>>>>
>>>>> More complex.
>>>>>
>>>>> Before database save, after database save, before/after cache put,
>>>>> before/after key looking, list lookup, etc.  Lots of events are
>>>>> watchable.
>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Question about EECAs

Adam Heath-2
Scott Gray wrote:
> But yes you are correct, removeAll results in a DELETE FROM [TABLE] WHERE ... so the delegator has no way of knowing what is being removed, this would effect the cache as well.

No, the cache isn't affected.  It(the cache) can be given a condition
of things to remove, and it will find everything that matches.