[ 
https://issues.apache.org/jira/browse/OFBIZ-12424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17451742#comment-17451742
 ] 

Jacques Le Roux commented on OFBIZ-12424:
-----------------------------------------

Actually no, w/o your change nothing happens at all, from trunk demo this 
morning:


{noformat}
2021-12-01 07:49:54,077 |27.0.0.1-8009-exec-3 |ControlServlet                
|T| [[[partymgr::linkparty (Domain:https://demo-trunk.ofbiz.apache.org)] 
Request Begun, encoding=[UTF-8]- total:0.0,since last(Begin):0.0]]
2021-12-01 07:49:54,086 |27.0.0.1-8009-exec-3 |RequestHandler                
|I| Rendering View [linkparty].  Hidden sessionId by default.
2021-12-01 07:49:54,087 |27.0.0.1-8009-exec-3 |ServiceDispatcher             
|T| Sync service [partymgr/getUserPreferenceGroup] finished in [1] milliseconds
2021-12-01 07:49:54,088 |27.0.0.1-8009-exec-3 |PrimaryKeyFinder              
|I| Returning null because found incomplete primary key in find: 
[GenericEntity:Party][partyId,null()]
2021-12-01 07:49:54,088 |27.0.0.1-8009-exec-3 |PrimaryKeyFinder              
|I| Returning null because found incomplete primary key in find: 
[GenericEntity:Person][partyId,null()]
2021-12-01 07:49:54,088 |27.0.0.1-8009-exec-3 |PrimaryKeyFinder              
|I| Returning null because found incomplete primary key in find: 
[GenericEntity:PartyGroup][partyId,null()]
2021-12-01 07:49:54,107 |27.0.0.1-8009-exec-3 |ServiceDispatcher             
|T| Sync service [partymgr/genericBasePermissionCheck] finished in [1] 
milliseconds
2021-12-01 07:49:54,107 |27.0.0.1-8009-exec-3 |ServiceEcaCondition           
|W| doRealCompare returned null, returning false
2021-12-01 07:49:54,107 |27.0.0.1-8009-exec-3 |ServiceEcaRule                
|I| For Service ECA [partyBasePermissionCheck] on [return] got false for 
condition: [hasPermission][equals][false][true][Boolean]
2021-12-01 07:49:54,107 |27.0.0.1-8009-exec-3 |ServiceDispatcher             
|T| Sync service [partymgr/partyBasePermissionCheck] finished in [1] 
milliseconds
2021-12-01 07:49:54,201 |27.0.0.1-8009-exec-3 |ServiceDispatcher             
|T| Sync service [partymgr/genericBasePermissionCheck] finished in [1] 
milliseconds
2021-12-01 07:49:54,201 |27.0.0.1-8009-exec-3 |ServiceEcaCondition           
|W| doRealCompare returned null, returning false
2021-12-01 07:49:54,201 |27.0.0.1-8009-exec-3 |ServiceEcaRule                
|I| For Service ECA [partyBasePermissionCheck] on [return] got false for 
condition: [hasPermission][equals][false][true][Boolean]
2021-12-01 07:49:54,201 |27.0.0.1-8009-exec-3 |ServiceDispatcher             
|T| Sync service [partymgr/partyBasePermissionCheck] finished in [1] 
milliseconds
2021-12-01 07:49:54,207 |27.0.0.1-8009-exec-3 |ServiceEcaCondition           
|W| doRealCompare returned null, returning false
2021-12-01 07:49:54,207 |27.0.0.1-8009-exec-3 |ServiceEcaRule                
|I| For Service ECA [partyBasePermissionCheck] on [return] got false for 
condition: [hasPermission][equals][false][true][Boolean]
2021-12-01 07:49:54,207 |27.0.0.1-8009-exec-3 |ServiceDispatcher             
|T| Sync service [partymgr/partyBasePermissionCheck] finished in [1] 
milliseconds
2021-12-01 07:49:54,209 |27.0.0.1-8009-exec-3 |ServiceEcaCondition           
|W| doRealCompare returned null, returning false
2021-12-01 07:49:54,209 |27.0.0.1-8009-exec-3 |ServiceEcaRule                
|I| For Service ECA [partyBasePermissionCheck] on [return] got false for 
condition: [hasPermission][equals][false][true][Boolean]
2021-12-01 07:49:54,209 |27.0.0.1-8009-exec-3 |ServiceDispatcher             
|T| Sync service [partymgr/partyBasePermissionCheck] finished in [1] 
milliseconds
2021-12-01 07:49:54,233 |27.0.0.1-8009-exec-3 |ServerHitBin                  
|I| Visit delegatorName=default, ServerHitBin delegatorName=default
2021-12-01 07:49:54,234 |27.0.0.1-8009-exec-3 |ControlServlet                
|T| [[[partymgr::linkparty (Domain:https://demo-trunk.ofbiz.apache.org)] 
Request Done- total:0.157,since last([partymgr::linkpa...):0.157]]
{noformat}

So it's quite better but needs more work

> Link Party feature stop the EECA rules globally
> -----------------------------------------------
>
>                 Key: OFBIZ-12424
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12424
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: Release Branch 18.12, Release Branch 17.12, Trunk
>            Reporter: Rohit Koushal
>            Assignee: Rohit Koushal
>            Priority: Major
>
> In the Link Party Feature({_}*partymgr > profile > Link Party*{_}) there is a 
> code that stops EECA rules globally in the system and as a result it caused 
> major issues in the process which are driven from EECA's.
>  
> *PartyServices.java*
> {code:java}
> public static Map<String, Object> linkParty(DispatchContext dctx, Map<String, 
> ? extends Object> context) {
>     Delegator delegator = dctx.getDelegator();
>     Locale locale = (Locale) context.get("locale");
>     delegator.setEntityEcaHandler(null);
> .
> .
> .
> } {code}
>  
> In the above code you can see that we are updating EntityEcaHandler on 
> delegator object to null.  
>  
> *GenericDelegator.java*
> {code:java}
> protected void evalRules(String event, String currentOperation, GenericEntity 
> value, boolean isError) throws GenericEntityException {
>     if (entityEcaHandler == null) {
>         return;
>     }
>     entityEcaHandler.evalRules(currentOperation, eventMap, event, value, 
> isError);
> } {code}
> On any DB operation(find, create and store) using delegator above method run 
> and due to null EntityEcaHandler object it won't execute any EECA's globally 
> in the system
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to