Improved: Add ability to disable entity eca rule (OFBIZ-9897)

We have enabled flag in EntityEcaRule class, if its set false then entity eca rule will not be execute.
But there is not way to disable entity eca.

We can add enabled flag in Entity ECA definition to disable the existing entity eca rule.

    Add new attribute on entity eca tag named enabled
    Default value will be true for this.
    If user want to disable existing OOTB entity eca rule, then user can define same rule in custom component and set the enabled=false

Also as per current flow if same seca rule is define more then once, system will execute all the rule, ideally it should not execute same rule (same rule, condition and action) if its defined more than one.

Also need to ovride hasCode, equals and toString method for EntityEcaRule, EntityEcaAction and EntityEcaCondition class file.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814160 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Deepak Dixit
2017-11-03 10:28:05 +00:00
parent 4785a20bb5
commit aae3cebccc
5 changed files with 150 additions and 6 deletions
+8
View File
@@ -77,6 +77,14 @@ under the License.
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="enabled" default="true">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="condition">
<xs:complexType>