You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Rohit Koushal (Jira)" <ji...@apache.org> on 2021/12/01 06:00:00 UTC
[jira] [Updated] (OFBIZ-12424) Link Party feature stop the EECA rule globally
[ https://issues.apache.org/jira/browse/OFBIZ-12424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rohit Koushal updated OFBIZ-12424:
----------------------------------
Description:
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
was:
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
> Link Party feature stop the EECA rule 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
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)