You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2019/10/21 16:17:12 UTC

[nifi] branch master updated: NIFI-6778 - Added rules engine service api and Easy Rules Implementation

This is an automated email from the ASF dual-hosted git repository.

mattyb149 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/master by this push:
     new 7c9d34f  NIFI-6778 - Added rules engine service api and Easy Rules Implementation
7c9d34f is described below

commit 7c9d34f820ea063349f7405c31d5587a040eb779
Author: Yolanda M. Davis <yo...@gmail.com>
AuthorDate: Wed Oct 16 10:49:37 2019 -0400

    NIFI-6778 - Added rules engine service api and Easy Rules Implementation
    
    NIFI-6778 - added comments and component description annotations
    
    NIFI-6778 - added license and notice details
    
    NIFI-6778 - added additional details section and updated description of service
    
    NIFI-6778 - fixed checkstyle error
    
    NIFI-6778 - addressed review comments for documentation and description corrections
    
    NIFI-6778 - added include-rules profile for assembly build
    
    NIFI-6778 - add MVEL and ASM to license and notice
    
    NIFI-6778 - switch to use Jackson for NiFi Rules Json deserialization
    
    Signed-off-by: Matthew Burgess <ma...@apache.org>
    
    This closes #3824
---
 nifi-assembly/LICENSE                              |  51 ++++
 nifi-assembly/pom.xml                              |  16 +-
 .../nifi-easyrules-nar/pom.xml                     |  46 ++++
 .../src/main/resources/META-INF/LICENSE            | 258 +++++++++++++++++++++
 .../src/main/resources/META-INF/NOTICE             |  46 ++++
 .../nifi-easyrules-service/pom.xml                 |  96 ++++++++
 .../java/org/apache/nifi/rules/RulesFactory.java   | 127 ++++++++++
 .../nifi/rules/engine/EasyRulesEngineService.java  | 194 ++++++++++++++++
 .../org.apache.nifi.controller.ControllerService   |  15 ++
 .../additionalDetails.html                         | 113 +++++++++
 .../org/apache/nifi/rules/TestRulesFactory.java    | 136 +++++++++++
 .../rules/engine/TestEasyRulesEngineService.java   | 147 ++++++++++++
 .../apache/nifi/rules/engine/TestProcessor.java    |  46 ++++
 .../src/test/resources/test_mvel_rules.json        |  16 ++
 .../src/test/resources/test_mvel_rules.yml         |  14 ++
 .../src/test/resources/test_nifi_rules.json        |  34 +++
 .../src/test/resources/test_nifi_rules.yml         |  28 +++
 .../src/test/resources/test_spel_rules.json        |  16 ++
 .../src/test/resources/test_spel_rules.yml         |  14 ++
 nifi-nar-bundles/nifi-easyrules-bundle/pom.xml     |  42 ++++
 .../nifi-rules-engine-service-api/pom.xml          |  36 +++
 .../main/java/org/apache/nifi/rules/Action.java    |  53 +++++
 .../java/org/apache/nifi/rules/ActionHandler.java  |  31 +++
 .../src/main/java/org/apache/nifi/rules/Rule.java  |  93 ++++++++
 .../nifi/rules/engine/RulesEngineService.java      |  47 ++++
 .../nifi-standard-services-api-nar/pom.xml         |   6 +
 nifi-nar-bundles/nifi-standard-services/pom.xml    |   1 +
 nifi-nar-bundles/pom.xml                           |   9 +-
 28 files changed, 1729 insertions(+), 2 deletions(-)

diff --git a/nifi-assembly/LICENSE b/nifi-assembly/LICENSE
index 66c7c13..a99d16d 100644
--- a/nifi-assembly/LICENSE
+++ b/nifi-assembly/LICENSE
@@ -2834,3 +2834,54 @@ The binary distribution of this product bundles 'JUnit Platform' and 'JUnit Jupi
   notice.
 
   You may add additional accurate notices of copyright ownership.
+
+The binary distribution of this product bundles 'easy-rules' under an MIT style license.
+
+    Copyright (c) 2019 Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
+
+    Permission is hereby granted, free of charge, to any person obtaining a copy
+    of this software and associated documentation files (the "Software"), to deal
+    in the Software without restriction, including without limitation the rights
+    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+    copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included in
+    all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+    THE SOFTWARE.
+
+The binary distribution of this product bundles the 'ASM' library which is available under a BSD style license.
+
+     Copyright (c) 2000-2005 INRIA, France Telecom
+     All rights reserved.
+
+     Redistribution and use in source and binary forms, with or without
+     modification, are permitted provided that the following conditions
+     are met:
+     1. Redistributions of source code must retain the above copyright
+        notice, this list of conditions and the following disclaimer.
+     2. Redistributions in binary form must reproduce the above copyright
+        notice, this list of conditions and the following disclaimer in the
+        documentation and/or other materials provided with the distribution.
+     3. Neither the name of the copyright holders nor the names of its
+        contributors may be used to endorse or promote products derived from
+        this software without specific prior written permission.
+
+     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+     ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+     LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+     CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+     SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+     INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+     CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+     ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+     THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/nifi-assembly/pom.xml b/nifi-assembly/pom.xml
index 8ce38b5..66c9271 100755
--- a/nifi-assembly/pom.xml
+++ b/nifi-assembly/pom.xml
@@ -721,7 +721,6 @@ language governing permissions and limitations under the License. -->
             <version>1.10.0-SNAPSHOT</version>
             <type>nar</type>
         </dependency>
-
         <!-- dependencies for jaxb/activation/annotation for running NiFi on Java 11 -->
         <!-- TODO: remove these once minimum Java version is 11 -->
         <dependency>
@@ -846,6 +845,21 @@ language governing permissions and limitations under the License. -->
             </dependencies>
         </profile>
         <profile>
+            <id>include-rules</id>
+            <!-- This profile handles includes of rules related artifacts. -->
+            <activation>
+                <activeByDefault>false</activeByDefault>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.nifi</groupId>
+                    <artifactId>nifi-easyrules-nar</artifactId>
+                    <version>1.10.0-SNAPSHOT</version>
+                    <type>nar</type>
+                </dependency>
+            </dependencies>
+        </profile>
+        <profile>
             <id>rpm</id>
             <activation>
                 <activeByDefault>false</activeByDefault>
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-nar/pom.xml b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-nar/pom.xml
new file mode 100644
index 0000000..06e9181
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-nar/pom.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <!--
+      Licensed to the Apache Software Foundation (ASF) under one or more
+      contributor license agreements. See the NOTICE file distributed with
+      this work for additional information regarding copyright ownership.
+      The ASF licenses this file to You under the Apache License, Version 2.0
+      (the "License"); you may not use this file except in compliance with
+      the License. You may obtain a copy of the License at
+      http://www.apache.org/licenses/LICENSE-2.0
+      Unless required by applicable law or agreed to in writing, software
+      distributed under the License is distributed on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+      See the License for the specific language governing permissions and
+      limitations under the License.
+    -->
+    <parent>
+        <artifactId>nifi-easyrules-bundle</artifactId>
+        <groupId>org.apache.nifi</groupId>
+        <version>1.10.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>nifi-easyrules-nar</artifactId>
+    <version>1.10.0-SNAPSHOT</version>
+    <packaging>nar</packaging>
+    <properties>
+        <maven.javadoc.skip>true</maven.javadoc.skip>
+        <source.skip>true</source.skip>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-easyrules-service</artifactId>
+            <version>1.10.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-standard-services-api-nar</artifactId>
+            <version>1.10.0-SNAPSHOT</version>
+            <type>nar</type>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-nar/src/main/resources/META-INF/LICENSE b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-nar/src/main/resources/META-INF/LICENSE
new file mode 100644
index 0000000..0177d83
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-nar/src/main/resources/META-INF/LICENSE
@@ -0,0 +1,258 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+
+nifi-easyrules-nar includes subcomponents with separate copyright notices and
+license terms. Your use of these subcomponents is subject to the terms
+and conditions of the following licenses:
+
+    The binary distribution of this product bundles 'Easy Rules' under an MIT style license.
+
+        Copyright (c) 2019 Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
+
+        Permission is hereby granted, free of charge, to any person obtaining a copy
+        of this software and associated documentation files (the "Software"), to deal
+        in the Software without restriction, including without limitation the rights
+        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+        copies of the Software, and to permit persons to whom the Software is
+        furnished to do so, subject to the following conditions:
+
+        The above copyright notice and this permission notice shall be included in
+        all copies or substantial portions of the Software.
+
+        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+        THE SOFTWARE.
+
+    The binary distribution of this product bundles the 'ASM' library which is available under a BSD style license.
+
+        Copyright (c) 2000-2005 INRIA, France Telecom
+        All rights reserved.
+
+        Redistribution and use in source and binary forms, with or without
+        modification, are permitted provided that the following conditions
+        are met:
+        1. Redistributions of source code must retain the above copyright
+        notice, this list of conditions and the following disclaimer.
+        2. Redistributions in binary form must reproduce the above copyright
+        notice, this list of conditions and the following disclaimer in the
+        documentation and/or other materials provided with the distribution.
+        3. Neither the name of the copyright holders nor the names of its
+        contributors may be used to endorse or promote products derived from
+        this software without specific prior written permission.
+
+        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+        ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+        LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+        CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+        SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+        INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+        CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+        ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+        THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-nar/src/main/resources/META-INF/NOTICE b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-nar/src/main/resources/META-INF/NOTICE
new file mode 100644
index 0000000..dc62f04
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-nar/src/main/resources/META-INF/NOTICE
@@ -0,0 +1,46 @@
+nifi-easyrules-nar
+Copyright 2014-2019 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+******************
+Apache Software License v2
+******************
+
+The following binary components are provided under the Apache Software License v2
+
+    (ASLv2) MVEL (MVFLEX Expression Language)
+
+    (ASLv2) SnakeYAML
+
+    (ASLv2) Jackson JSON processor
+    The following NOTICE information applies:
+      # Jackson JSON processor
+
+      Jackson is a high-performance, Free/Open Source JSON processing library.
+      It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has
+      been in development since 2007.
+      It is currently developed by a community of developers, as well as supported
+      commercially by FasterXML.com.
+
+      ## Licensing
+
+      Jackson core and extension components may licensed under different licenses.
+      To find the details that apply to this artifact see the accompanying LICENSE file.
+      For more information, including possible other licensing options, contact
+      FasterXML.com (http://fasterxml.com).
+
+      ## Credits
+
+      A list of contributors may be found from CREDITS file, which is included
+      in some artifacts (usually source distributions); but is always available
+      from the source code management (SCM) system project uses.
+
+************************
+The MIT License
+************************
+
+The following binary components are provided under the MIT License.
+
+  (MIT License) Easy Rules
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/pom.xml b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/pom.xml
new file mode 100644
index 0000000..eae6157
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/pom.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <!--
+      Licensed to the Apache Software Foundation (ASF) under one or more
+      contributor license agreements. See the NOTICE file distributed with
+      this work for additional information regarding copyright ownership.
+      The ASF licenses this file to You under the Apache License, Version 2.0
+      (the "License"); you may not use this file except in compliance with
+      the License. You may obtain a copy of the License at
+      http://www.apache.org/licenses/LICENSE-2.0
+      Unless required by applicable law or agreed to in writing, software
+      distributed under the License is distributed on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+      See the License for the specific language governing permissions and
+      limitations under the License.
+    -->
+    <parent>
+        <artifactId>nifi-easyrules-bundle</artifactId>
+        <groupId>org.apache.nifi</groupId>
+        <version>1.10.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>nifi-easyrules-service</artifactId>
+    <packaging>jar</packaging>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-rules-engine-service-api</artifactId>
+            <version>1.10.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.yaml</groupId>
+            <artifactId>snakeyaml</artifactId>
+            <version>1.25</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-utils</artifactId>
+            <version>1.10.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jeasy</groupId>
+            <artifactId>easy-rules-core</artifactId>
+            <version>3.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jeasy</groupId>
+            <artifactId>easy-rules-mvel</artifactId>
+            <version>3.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jeasy</groupId>
+            <artifactId>easy-rules-spel</artifactId>
+            <version>3.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+            <version>2.9.10</version>
+        </dependency>
+        <!-- test -->
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-mock</artifactId>
+            <version>1.10.0-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.rat</groupId>
+                <artifactId>apache-rat-plugin</artifactId>
+                <configuration>
+                    <excludes combine.children="append">
+                        <exclude>src/test/resources/test_nifi_rules.json</exclude>
+                        <exclude>src/test/resources/test_nifi_rules.yml</exclude>
+                        <exclude>src/test/resources/test_mvel_rules.json</exclude>
+                        <exclude>src/test/resources/test_mvel_rules.yml</exclude>
+                        <exclude>src/test/resources/test_spel_rules.json</exclude>
+                        <exclude>src/test/resources/test_spel_rules.yml</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/main/java/org/apache/nifi/rules/RulesFactory.java b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/main/java/org/apache/nifi/rules/RulesFactory.java
new file mode 100644
index 0000000..18b6b1c
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/main/java/org/apache/nifi/rules/RulesFactory.java
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.rules;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.jeasy.rules.support.JsonRuleDefinitionReader;
+import org.jeasy.rules.support.RuleDefinition;
+import org.jeasy.rules.support.RuleDefinitionReader;
+import org.jeasy.rules.support.YamlRuleDefinitionReader;
+import org.yaml.snakeyaml.Yaml;
+import org.yaml.snakeyaml.constructor.Constructor;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * Factory which transform file based rules into NiFi Rules API.  Rules formats supported are NiFi Rules format and
+ * Easy Rules MVEL and SPEL formats. JSON and YaML file types are support for both formats
+ */
+public class RulesFactory {
+
+    enum FileType {
+        YAML, JSON;
+    }
+
+    enum FileFormat {
+        NIFI, MVEL, SPEL;
+    }
+
+    public static List<Rule> createRules(String ruleFile, String ruleFileType, String rulesFileFormat) throws Exception{
+        FileFormat fileFormat = FileFormat.valueOf(rulesFileFormat);
+        switch (fileFormat){
+            case NIFI:
+                return createRulesFromNiFiFormat(ruleFile, ruleFileType);
+            case MVEL:
+            case SPEL:
+                return createRulesFromEasyRulesFormat(ruleFile, ruleFileType, rulesFileFormat);
+            default:
+                return null;
+        }
+    }
+
+    private static List<Rule> createRulesFromEasyRulesFormat(String ruleFile, String ruleFileType, String ruleFileFormat) throws Exception{
+
+        RuleDefinitionReader reader = FileType.valueOf(ruleFileType).equals(FileType.YAML)
+                                      ? new YamlRuleDefinitionReader() : new JsonRuleDefinitionReader();
+
+        List<RuleDefinition> ruleDefinitions = reader.read(new FileReader(ruleFile));
+
+        return ruleDefinitions.stream().map(ruleDefinition -> {
+
+            Rule rule = new Rule();
+            rule.setName(ruleDefinition.getName());
+            rule.setDescription(ruleDefinition.getDescription());
+            rule.setPriority(ruleDefinition.getPriority());
+            rule.setCondition(ruleDefinition.getCondition());
+            List<Action> actions = ruleDefinition.getActions().stream().map(ruleAction -> {
+                Action action = new Action();
+                action.setType("EXPRESSION");
+                Map<String,String> attributes = new HashMap<>();
+                attributes.put("command", ruleAction);
+                attributes.put("type", ruleFileFormat);
+                action.setAttributes(attributes);
+                return action;
+            }).collect(Collectors.toList());
+            rule.setActions(actions);
+            return rule;
+
+        }).collect(Collectors.toList());
+    }
+
+    private static List<Rule> createRulesFromNiFiFormat(String ruleFile, String ruleFileType) throws Exception{
+        FileType type = FileType.valueOf(ruleFileType.toUpperCase());
+        if (type.equals(FileType.YAML)) {
+            return yamlToRules(ruleFile);
+        } else if (type.equals(FileType.JSON)) {
+            return jsonToRules(ruleFile);
+        } else {
+            return null;
+        }
+    }
+
+    private static List<Rule> yamlToRules(String rulesFile) throws FileNotFoundException {
+        List<Rule> rules = new ArrayList<>();
+        Yaml yaml = new Yaml(new Constructor(Rule.class));
+        File yamlFile = new File(rulesFile);
+        InputStream inputStream = new FileInputStream(yamlFile);
+        for (Object object : yaml.loadAll(inputStream)) {
+            if (object instanceof Rule) {
+                rules.add((Rule) object);
+            }
+        }
+        return rules;
+    }
+
+    private static List<Rule> jsonToRules(String rulesFile) throws Exception {
+        List<Rule> rules;
+        InputStreamReader isr = new InputStreamReader(new FileInputStream(rulesFile));
+        final ObjectMapper objectMapper = new ObjectMapper();
+        rules = objectMapper.readValue(isr, new TypeReference<List<Rule>>(){});
+        return rules;
+    }
+}
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/main/java/org/apache/nifi/rules/engine/EasyRulesEngineService.java b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/main/java/org/apache/nifi/rules/engine/EasyRulesEngineService.java
new file mode 100644
index 0000000..1318009
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/main/java/org/apache/nifi/rules/engine/EasyRulesEngineService.java
@@ -0,0 +1,194 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.rules.engine;
+
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.lifecycle.OnEnabled;
+import org.apache.nifi.components.AllowableValue;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.controller.AbstractControllerService;
+import org.apache.nifi.controller.ConfigurationContext;
+import org.apache.nifi.controller.ControllerServiceInitializationContext;
+import org.apache.nifi.expression.ExpressionLanguageScope;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.apache.nifi.reporting.InitializationException;
+import org.apache.nifi.rules.Action;
+import org.apache.nifi.rules.ActionHandler;
+import org.apache.nifi.rules.Rule;
+import org.apache.nifi.rules.RulesFactory;
+import org.jeasy.rules.api.Condition;
+import org.jeasy.rules.api.Facts;
+import org.jeasy.rules.api.RuleListener;
+import org.jeasy.rules.api.Rules;
+import org.jeasy.rules.core.DefaultRulesEngine;
+import org.jeasy.rules.core.RuleBuilder;
+import org.jeasy.rules.mvel.MVELCondition;
+import org.jeasy.rules.spel.SpELCondition;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Implementation of RulesEngineService interface
+ *
+ * @see RulesEngineService
+ */
+@CapabilityDescription("Defines and execute the rules stored in NiFi or EasyRules file formats for a given set of facts. Supports " +
+        "rules stored as JSON or YAML file types.")
+@Tags({ "rules","rules-engine","engine","actions","facts" })
+public class EasyRulesEngineService  extends AbstractControllerService implements RulesEngineService {
+
+    static final AllowableValue YAML = new AllowableValue("YAML", "YAML", "YAML file configuration type.");
+    static final AllowableValue JSON = new AllowableValue("JSON", "JSON", "JSON file configuration type.");
+    static final AllowableValue NIFI = new AllowableValue("NIFI", "NIFI", "NiFi rules formatted file.");
+    static final AllowableValue MVEL = new AllowableValue("MVEL", "Easy Rules MVEL", "Easy Rules File format using MVFLEX Expression Language");
+    static final AllowableValue SPEL = new AllowableValue("SPEL", "Easy Rules SpEL", "Easy Rules File format using Spring Expression Language");
+
+    static final PropertyDescriptor RULES_FILE_PATH = new PropertyDescriptor.Builder()
+            .name("rules-file-path")
+            .displayName("Rules File Path")
+            .description("Path to location of rules file.")
+            .required(true)
+            .addValidator(StandardValidators.FILE_EXISTS_VALIDATOR)
+            .expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY)
+            .build();
+
+    static final PropertyDescriptor RULES_FILE_TYPE = new PropertyDescriptor.Builder()
+            .name("rules-file-type")
+            .displayName("Rules File Type")
+            .description("File type for rules definition. Supported file types are YAML and JSON")
+            .required(true)
+            .allowableValues(JSON,YAML)
+            .defaultValue(JSON.getValue())
+            .build();
+
+    static final PropertyDescriptor RULES_FILE_FORMAT = new PropertyDescriptor.Builder()
+            .name("rules-file-format")
+            .displayName("Rules File Format")
+            .description("File format for rules. Supported formats are NiFi Rules, Easy Rules files with MVEL Expression Language" +
+                    " and Easy Rules files with Spring Expression Language.")
+            .required(true)
+            .allowableValues(NIFI,MVEL,SPEL)
+            .defaultValue(NIFI.getValue())
+            .build();
+
+
+    protected List<PropertyDescriptor> properties;
+    protected volatile List<Rule> rules;
+    protected volatile String rulesFileFormat;
+
+    @Override
+    protected void init(ControllerServiceInitializationContext config) throws InitializationException {
+        super.init(config);
+        final List<PropertyDescriptor> properties = new ArrayList<>();
+        properties.add(RULES_FILE_TYPE);
+        properties.add(RULES_FILE_PATH);
+        properties.add(RULES_FILE_FORMAT);
+        this.properties = Collections.unmodifiableList(properties);
+    }
+
+    @Override
+    protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
+        return properties;
+    }
+
+    @OnEnabled
+    public void onEnabled(final ConfigurationContext context) throws InitializationException {
+        final String rulesFile = context.getProperty(RULES_FILE_PATH).getValue();
+        final String rulesFileType = context.getProperty(RULES_FILE_TYPE).getValue();
+        rulesFileFormat = context.getProperty(RULES_FILE_FORMAT).getValue();
+        try{
+            rules = RulesFactory.createRules(rulesFile, rulesFileType, rulesFileFormat);
+        } catch (Exception fex){
+            throw new InitializationException(fex);
+        }
+    }
+
+    /**
+     * Return the list of actions what should be executed for a given set of facts
+     * @param facts a Map of key and facts values, as objects, that should be evaluated by the rules engine
+     * @return
+     */
+    @Override
+    public List<Action> fireRules(Map<String, Object> facts) {
+        final List<Action> actions = new ArrayList<>();
+        if(rules == null){
+            return null;
+        }else {
+            org.jeasy.rules.api.Rules easyRules = convertToEasyRules(rules, (action, eventFacts) ->
+                    actions.add(action));
+            Facts easyFacts = new Facts();
+            facts.forEach(easyFacts::put);
+            DefaultRulesEngine rulesEngine = new DefaultRulesEngine();
+            rulesEngine.registerRuleListener(new EasyRulesListener());
+            rulesEngine.fire(easyRules, easyFacts);
+            return actions;
+        }
+    }
+
+
+    protected Rules convertToEasyRules(List<Rule> rules, ActionHandler actionHandler) {
+        final Rules easyRules = new Rules();
+        rules.forEach(rule -> {
+            RuleBuilder ruleBuilder = new RuleBuilder();
+            Condition condition = rulesFileFormat.equalsIgnoreCase(SPEL.getValue())
+                                 ? new SpELCondition(rule.getCondition()): new MVELCondition(rule.getCondition());
+            ruleBuilder.name(rule.getName())
+                    .description(rule.getDescription())
+                    .priority(rule.getPriority())
+                    .when(condition);
+            for (Action action : rule.getActions()) {
+                ruleBuilder.then(facts -> {
+                    actionHandler.execute(action, facts.asMap());
+                });
+            }
+            easyRules.register(ruleBuilder.build());
+        });
+        return easyRules;
+    }
+
+    private class EasyRulesListener implements RuleListener {
+        @Override
+        public boolean beforeEvaluate(org.jeasy.rules.api.Rule rule, Facts facts) {
+            return true;
+        }
+
+        @Override
+        public void afterEvaluate(org.jeasy.rules.api.Rule rule, Facts facts, boolean b) {
+
+        }
+
+        @Override
+        public void beforeExecute(org.jeasy.rules.api.Rule rule, Facts facts) {
+
+        }
+
+        @Override
+        public void onSuccess(org.jeasy.rules.api.Rule rule, Facts facts) {
+            getLogger().debug("Rules was successfully processed for: {}",new Object[]{rule.getName()});
+        }
+
+        @Override
+        public void onFailure(org.jeasy.rules.api.Rule rule, Facts facts, Exception e) {
+            getLogger().warn("Rule execution failed for: {}", new Object[]{rule.getName()}, e);
+        }
+    }
+
+}
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/main/resources/META-INF/services/org.apache.nifi.controller.ControllerService b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/main/resources/META-INF/services/org.apache.nifi.controller.ControllerService
new file mode 100644
index 0000000..5e5f394
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/main/resources/META-INF/services/org.apache.nifi.controller.ControllerService
@@ -0,0 +1,15 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+org.apache.nifi.rules.engine.EasyRulesEngineService
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/main/resources/docs/org.apache.nifi.rules.engine.EasyRulesEngineService/additionalDetails.html b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/main/resources/docs/org.apache.nifi.rules.engine.EasyRulesEngineService/additionalDetails.html
new file mode 100644
index 0000000..df80687
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/main/resources/docs/org.apache.nifi.rules.engine.EasyRulesEngineService/additionalDetails.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html>
+<html lang="en">
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+      http://www.apache.org/licenses/LICENSE-2.0
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<head>
+    <meta charset="utf-8" />
+    <title>EasyRulesEngineService</title>
+    <link rel="stylesheet" href="../../../../../css/component-usage.css" type="text/css" />
+</head>
+<body>
+<h2>General</h2>
+<p>The Easy Rules Engine Service supports execution of a centralized set of rules (stored as files) against a provided set of data called facts.  Facts sent to the service are processed against
+    the rules engine to determine what, if any, actions should be executed based on the conditions defined within the rules. The list of actions are returned to the caller to handle as needed.
+</p>
+<p>
+    Rules files can be implemented in any of the following formats:
+</p>
+<ul>
+    <li> NiFi Rules Format - This is a rules file which follows the NiFi style for rules definition, which supports MVEL (MVFLEX) Expression language for conditions (default format).
+    </li>
+    <li> Easy Rules Format with MVEL Support - This is a rules file which follows the Easy Rules style for rules definition that supports MVEL (MVFLEX) Expression language for conditions and actions
+    </li>
+    <li> Easy Rules Format with SPEL Support - This is a rules file which follows the Easy Rules style for rules definition that supports Spring Expression language for conditions and actions
+    </li>
+</ul>
+<p>
+    All rules formats can be implemented as JSON or YAML files (with JSON serving as default file type).
+</p>
+
+<p>
+    NiFi Rules Format consist of the following elements:
+</p>
+<table>
+    <tr><td>Name</td><td>The name of the rule.</td></tr>
+    <tr><td>Description</td><td>A description of the rule.</td></tr>
+    <tr><td>Priority</td><td>Unique number for order in which rule should be executed in the rules engine.</td></tr>
+    <tr><td>Condition</td><td>The condition that will be checked given a set of fact data. For NiFi Format the MVEL expression language is supported.</td></tr>
+    <tr><td>Action(s)</td><td>The required actions that should be performed if the condition checked returns true.  This includes the type of action and any attributes required to execute that action. Action types and attributes are string values that can be defined as needed.
+    The expectation is the types and attributes are understood by the caller/action executor.</td></tr>
+    <tr><td>Fact(s)</td><td>The name of fact item(s) that is required to execute the rule.</td></tr>
+</table>
+
+<p>
+    NiFi rules format is very similar to Easy Rules file format except the Action includes details for the type of action that should be performed along with attributes for performing the action.
+    This provides a more flexible way to configure external handlers that will execute returned actions.  When Easy Rules formats are provided, easy rule actions are translated into an "EXPRESSION" NiFi action type where the attributes contains
+    the command that should be executed directly along with the supported expression language type (via a "command" and "type" attributes respectively).
+</p>
+
+<p>
+    The following are examples of NiFi Rules Format as YAML and JSON file types. In both cases a single rule is shown however multiple rule entries can be provided (following the appropriate multiple entry syntax for the given file type):
+</p>
+<p>
+    <b>NiFi Rules YAML File</b>: This file shows an example of a single rule which checks if predictedQueuedCount value (provided in facts) is greater than 50. If the condition is met an action with the type of "LOG" is defined,
+    which denotes the action that should be taken by the caller. Attributes for the "LOG" action type can be provided as demonstrated below with the "logLevel and "message" attributes.  The caller can use these or other provided attributes in order
+    to configure and execute the "LOG" action.<br>
+<pre>
+name: "Queue Size"
+description: "Queue size check greater than 50"
+priority: 1
+condition: "predictedQueuedCount > 50"
+actions:
+  - type: "LOG"
+    attributes:
+      logLevel: "DEBUG"
+      message: "Queue Size Over 50 is detected!"
+facts:
+  - "predictedQueuedCount"
+</pre>
+</p>
+
+<p>
+    <b>NiFi Rules JSON File</b>:  This file shows an example of a single rule which checks the size of a flowFile (with a flowFile being available via facts).
+    If the condition is met two actions are defined for execution (with types that should be recognized by the caller).<br>
+<pre>
+[
+{
+"name": "Large Flow File",
+"description": "Flow File Size Larger Than Expected",
+"priority": 1,
+"condition": "flowFile.size > 500",
+"actions": [
+{
+"type": "LOG",
+"attributes": {
+"logLevel": "WARN",
+"message": "Unexpected file size!"
+},
+{
+"type": "SEND",
+"attributes": {
+"sendZeroResults": "false"
+}
+}
+],
+"facts": ["flowFile"]
+}
+]
+</pre>
+</p>
+</body>
+</html>
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/java/org/apache/nifi/rules/TestRulesFactory.java b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/java/org/apache/nifi/rules/TestRulesFactory.java
new file mode 100644
index 0000000..9cc8afd
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/java/org/apache/nifi/rules/TestRulesFactory.java
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.rules;
+
+import org.junit.Test;
+
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.fail;
+
+public class TestRulesFactory {
+    @Test
+    public void testCreateRulesFromNiFiYaml(){
+        try {
+            String testYamlFile = "src/test/resources/test_nifi_rules.yml";
+            List<Rule> rules = RulesFactory.createRules(testYamlFile,"YAML", "NIFI");
+            assertEquals(2, rules.size());
+            assert confirmEntries(rules);
+        }catch (Exception ex){
+            fail("Unexpected exception occurred: "+ex.getMessage());
+        }
+    }
+
+    @Test
+    public void testCreateRulesFromMvelYaml(){
+        try {
+            String testYamlFile = "src/test/resources/test_mvel_rules.yml";
+            List<Rule> rules = RulesFactory.createRules(testYamlFile,"YAML", "MVEL");
+            assertEquals(2, rules.size());
+            assert confirmEntries(rules);
+            assertSame("EXPRESSION", rules.get(0).getActions().get(0).getType());
+        }catch (Exception ex){
+            fail("Unexpected exception occurred: "+ex.getMessage());
+        }
+    }
+
+    @Test
+    public void testCreateRulesFromSpelYaml(){
+        try {
+            String testYamlFile = "src/test/resources/test_spel_rules.yml";
+            List<Rule> rules = RulesFactory.createRules(testYamlFile,"YAML", "SPEL");
+            assertEquals(2, rules.size());
+            assertSame("EXPRESSION", rules.get(0).getActions().get(0).getType());
+        }catch (Exception ex){
+            fail("Unexpected exception occurred: "+ex.getMessage());
+        }
+    }
+
+    @Test
+    public void testCreateRulesFromNiFiJson(){
+        try {
+            String testJsonFile = "src/test/resources/test_nifi_rules.json";
+            List<Rule> rules = RulesFactory.createRules(testJsonFile,"JSON", "NIFI");
+            assertEquals(2, rules.size());
+            assert confirmEntries(rules);
+        }catch (Exception ex){
+            fail("Unexpected exception occurred: "+ex.getMessage());
+        }
+    }
+
+    @Test
+    public void testCreateRulesFromMvelJson(){
+        try {
+            String testJsonFile = "src/test/resources/test_mvel_rules.json";
+            List<Rule> rules = RulesFactory.createRules(testJsonFile,"JSON", "MVEL");
+            assertEquals(2, rules.size());
+            assertSame("EXPRESSION", rules.get(0).getActions().get(0).getType());
+            assert confirmEntries(rules);
+        }catch (Exception ex){
+            fail("Unexpected exception occurred: "+ex.getMessage());
+        }
+    }
+
+    @Test
+    public void testCreateRulesFromSpelJson(){
+        try {
+            String testJsonFile = "src/test/resources/test_spel_rules.json";
+            List<Rule> rules = RulesFactory.createRules(testJsonFile,"JSON", "SPEL");
+            assertEquals(2, rules.size());
+            assertSame("EXPRESSION", rules.get(0).getActions().get(0).getType());
+        }catch (Exception ex){
+            fail("Unexpected exception occurred: "+ex.getMessage());
+        }
+    }
+
+    @Test
+    public void testFakeTypeNotSupported(){
+        try {
+            RulesFactory.createRules("FAKEFILE", "FAKE", "NIFI");
+        }catch (Exception ex){
+            return;
+        }
+        fail("Exception should have been thrown for unexpected type");
+    }
+
+    @Test
+    public void testFakeFormatNotSupported(){
+        try {
+            RulesFactory.createRules("FAKEFILE", "JSON", "FAKE");
+        }catch (Exception ex){
+            return;
+        }
+        fail("Exception should have been thrown for unexpected type");
+    }
+
+
+    private boolean confirmEntries(List<Rule> rules){
+        Rule rule1= rules.get(0);
+        Rule rule2 = rules.get(1);
+
+        boolean checkDiagnostic = rule1.getName().equals("Queue Size") && rule1.getDescription().equals("Queue size check greater than 50")
+                && rule1.getPriority() == 1 && rule1.getCondition().equals("predictedQueuedCount > 50");
+
+        checkDiagnostic = rule2.getName().equals("Time To Back Pressure") && rule2.getDescription().equals("Back pressure time less than 5 minutes")
+                && rule2.getPriority() == 2 && rule2.getCondition().equals("predictedTimeToBytesBackpressureMillis >= 300000") && checkDiagnostic;
+
+        return checkDiagnostic;
+
+    }
+}
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/java/org/apache/nifi/rules/engine/TestEasyRulesEngineService.java b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/java/org/apache/nifi/rules/engine/TestEasyRulesEngineService.java
new file mode 100644
index 0000000..223c1b4
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/java/org/apache/nifi/rules/engine/TestEasyRulesEngineService.java
@@ -0,0 +1,147 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.rules.engine;
+
+import org.apache.nifi.reporting.InitializationException;
+import org.apache.nifi.rules.Action;
+import org.apache.nifi.util.TestRunner;
+import org.apache.nifi.util.TestRunners;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+public class TestEasyRulesEngineService {
+
+    @Test
+    public void testYamlNiFiRules() throws InitializationException, IOException {
+        final TestRunner runner = TestRunners.newTestRunner(TestProcessor.class);
+        final RulesEngineService service = new MockEasyRulesEngineService();
+        runner.addControllerService("easy-rules-engine-service-test",service);
+        runner.setProperty(service, EasyRulesEngineService.RULES_FILE_PATH, "src/test/resources/test_nifi_rules.yml");
+        runner.setProperty(service,EasyRulesEngineService.RULES_FILE_TYPE, "YAML");
+        runner.setProperty(service,EasyRulesEngineService.RULES_FILE_FORMAT, "NIFI");
+        runner.enableControllerService(service);
+        runner.assertValid(service);
+        Map<String, Object> facts = new HashMap<>();
+        facts.put("predictedQueuedCount",60);
+        facts.put("predictedTimeToBytesBackpressureMillis",300000);
+        List<Action> actions = service.fireRules(facts);
+        assertNotNull(actions);
+        assertEquals(actions.size(), 3);
+    }
+
+    @Test
+    public void testYamlMvelRules() throws InitializationException, IOException {
+        final TestRunner runner = TestRunners.newTestRunner(TestProcessor.class);
+        final RulesEngineService service = new MockEasyRulesEngineService();
+        runner.addControllerService("easy-rules-engine-service-test",service);
+        runner.setProperty(service, EasyRulesEngineService.RULES_FILE_PATH, "src/test/resources/test_mvel_rules.yml");
+        runner.setProperty(service,EasyRulesEngineService.RULES_FILE_TYPE, "YAML");
+        runner.setProperty(service,EasyRulesEngineService.RULES_FILE_FORMAT, "MVEL");
+        runner.enableControllerService(service);
+        runner.assertValid(service);
+        Map<String, Object> facts = new HashMap<>();
+        facts.put("predictedQueuedCount",60);
+        facts.put("predictedTimeToBytesBackpressureMillis",300000);
+        List<Action> actions = service.fireRules(facts);
+        assertNotNull(actions);
+        assertEquals(actions.size(), 2);
+    }
+
+    @Test
+    public void testYamlSpelRules() throws InitializationException, IOException {
+        final TestRunner runner = TestRunners.newTestRunner(TestProcessor.class);
+        final RulesEngineService service = new MockEasyRulesEngineService();
+        runner.addControllerService("easy-rules-engine-service-test",service);
+        runner.setProperty(service, EasyRulesEngineService.RULES_FILE_PATH, "src/test/resources/test_spel_rules.yml");
+        runner.setProperty(service,EasyRulesEngineService.RULES_FILE_TYPE, "YAML");
+        runner.setProperty(service,EasyRulesEngineService.RULES_FILE_FORMAT, "SPEL");
+        runner.enableControllerService(service);
+        runner.assertValid(service);
+        Map<String, Object> facts = new HashMap<>();
+        facts.put("predictedQueuedCount",60);
+        facts.put("predictedTimeToBytesBackpressureMillis",300000);
+        List<Action> actions = service.fireRules(facts);
+        assertNotNull(actions);
+        assertEquals(actions.size(), 2);
+    }
+
+    @Test
+    public void testJsonNiFiRules() throws InitializationException, IOException {
+        final TestRunner runner = TestRunners.newTestRunner(TestProcessor.class);
+        final RulesEngineService service = new MockEasyRulesEngineService();
+        runner.addControllerService("easy-rules-engine-service-test",service);
+        runner.setProperty(service, EasyRulesEngineService.RULES_FILE_PATH, "src/test/resources/test_nifi_rules.json");
+        runner.setProperty(service,EasyRulesEngineService.RULES_FILE_TYPE, "JSON");
+        runner.setProperty(service,EasyRulesEngineService.RULES_FILE_FORMAT, "NIFI");
+        runner.enableControllerService(service);
+        runner.assertValid(service);
+        Map<String, Object> facts = new HashMap<>();
+        facts.put("predictedQueuedCount",60);
+        facts.put("predictedTimeToBytesBackpressureMillis",300000);
+        List<Action> actions = service.fireRules(facts);
+        assertNotNull(actions);
+        assertEquals(actions.size(), 2);
+    }
+
+    @Test
+    public void testJsonMvelRules() throws InitializationException, IOException {
+        final TestRunner runner = TestRunners.newTestRunner(TestProcessor.class);
+        final RulesEngineService service = new MockEasyRulesEngineService();
+        runner.addControllerService("easy-rules-engine-service-test",service);
+        runner.setProperty(service, EasyRulesEngineService.RULES_FILE_PATH, "src/test/resources/test_mvel_rules.json");
+        runner.setProperty(service,EasyRulesEngineService.RULES_FILE_TYPE, "JSON");
+        runner.setProperty(service,EasyRulesEngineService.RULES_FILE_FORMAT, "MVEL");
+        runner.enableControllerService(service);
+        runner.assertValid(service);
+        Map<String, Object> facts = new HashMap<>();
+        facts.put("predictedQueuedCount",60);
+        facts.put("predictedTimeToBytesBackpressureMillis",300000);
+        List<Action> actions = service.fireRules(facts);
+        assertNotNull(actions);
+        assertEquals(actions.size(), 2);
+    }
+
+    @Test
+    public void testJsonSpelRules() throws InitializationException, IOException {
+        final TestRunner runner = TestRunners.newTestRunner(TestProcessor.class);
+        final RulesEngineService service = new MockEasyRulesEngineService();
+        runner.addControllerService("easy-rules-engine-service-test",service);
+        runner.setProperty(service, EasyRulesEngineService.RULES_FILE_PATH, "src/test/resources/test_spel_rules.json");
+        runner.setProperty(service,EasyRulesEngineService.RULES_FILE_TYPE, "JSON");
+        runner.setProperty(service,EasyRulesEngineService.RULES_FILE_FORMAT, "SPEL");
+        runner.enableControllerService(service);
+        runner.assertValid(service);
+        Map<String, Object> facts = new HashMap<>();
+        facts.put("predictedQueuedCount",60);
+        facts.put("predictedTimeToBytesBackpressureMillis",300000);
+        List<Action> actions = service.fireRules(facts);
+        assertNotNull(actions);
+        assertEquals(actions.size(), 2);
+    }
+
+    private class MockEasyRulesEngineService extends EasyRulesEngineService {
+
+    }
+
+}
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/java/org/apache/nifi/rules/engine/TestProcessor.java b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/java/org/apache/nifi/rules/engine/TestProcessor.java
new file mode 100644
index 0000000..5cdb829
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/java/org/apache/nifi/rules/engine/TestProcessor.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.rules.engine;
+
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.exception.ProcessException;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TestProcessor extends AbstractProcessor {
+
+        @Override
+        public void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException {
+        }
+
+        @Override
+        protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
+            List<PropertyDescriptor> properties = new ArrayList<>();
+            properties.add(new PropertyDescriptor.Builder()
+                    .name("easy-rules-engine-service-test")
+                    .description("Easy Rules Engine Service")
+                    .identifiesControllerService(EasyRulesEngineService.class)
+                    .required(true)
+                    .build());
+            return properties;
+        }
+
+}
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_mvel_rules.json b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_mvel_rules.json
new file mode 100644
index 0000000..190d5e7
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_mvel_rules.json
@@ -0,0 +1,16 @@
+[
+  {
+    "name": "Queue Size",
+    "description": "Queue size check greater than 50",
+    "priority": 1,
+    "condition": "predictedQueuedCount > 50",
+    "actions": ["System.out.println(\"Queue Size Over 50 is detected!\")"]
+  },
+  {
+    "name": "Time To Back Pressure",
+    "description": "Back pressure time less than 5 minutes",
+    "priority": 2,
+    "condition": "predictedTimeToBytesBackpressureMillis >= 300000",
+    "actions": ["System.out.println(\"Back Pressure prediction less than 5 minutes!\")"]
+  }
+]
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_mvel_rules.yml b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_mvel_rules.yml
new file mode 100644
index 0000000..f3d9150
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_mvel_rules.yml
@@ -0,0 +1,14 @@
+---
+name: "Queue Size"
+description: "Queue size check greater than 50"
+priority: 1
+condition: "predictedQueuedCount > 50"
+actions:
+  - "System.out.println(\"Queue Size Over 50 is detected!\")"
+---
+name: "Time To Back Pressure"
+description: "Back pressure time less than 5 minutes"
+priority: 2
+condition: "predictedTimeToBytesBackpressureMillis >= 300000"
+actions:
+  - "System.out.println(\"Back Pressure prediction less than 5 minutes!\")"
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_nifi_rules.json b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_nifi_rules.json
new file mode 100644
index 0000000..33554af
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_nifi_rules.json
@@ -0,0 +1,34 @@
+[
+{
+"name": "Queue Size",
+"description": "Queue size check greater than 50",
+"priority": 1,
+"condition": "predictedQueuedCount > 50",
+"actions": [
+{
+"type": "LOG",
+"attributes": {
+"logLevel": "debug",
+"message": "Queue Size Over 50 is detected!"
+}
+}
+],
+"facts": ["predictedQueuedCount"]
+},
+{
+"name": "Time To Back Pressure",
+"description": "Back pressure time less than 5 minutes",
+"priority": 2,
+"condition": "predictedTimeToBytesBackpressureMillis >= 300000",
+"actions": [
+{
+"type": "LOG",
+"attributes": {
+"logLevel": "warn",
+"message": "Back Pressure prediction less than 5 minutes!"
+}
+}
+],
+  "facts":["predictedTimeToBytesBackpressureMillis"]
+}
+]
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_nifi_rules.yml b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_nifi_rules.yml
new file mode 100644
index 0000000..ebcec61
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_nifi_rules.yml
@@ -0,0 +1,28 @@
+---
+name: "Queue Size"
+description: "Queue size check greater than 50"
+priority: 1
+condition: "predictedQueuedCount > 50"
+actions:
+  - type: "LOG"
+    attributes:
+      logLevel: "DEBUG"
+      message: "Queue Size Over 50 is detected!"
+facts:
+  - "predictedQueuedCount"
+---
+name: "Time To Back Pressure"
+description: "Back pressure time less than 5 minutes"
+priority: 2
+condition: "predictedTimeToBytesBackpressureMillis >= 300000"
+actions:
+  - type: "LOG"
+    attributes:
+      logLevel: "INFO"
+      message: "Back Pressure prediction less than 5 minutes!"
+  - type: "ALERT"
+    attributes:
+      severity: "INFO"
+      message: "Back Pressure prediction less than 5 minutes!"
+facts:
+  - "predictedTimeToBytesBackpressureMillis"
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_spel_rules.json b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_spel_rules.json
new file mode 100644
index 0000000..4e50bbd
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_spel_rules.json
@@ -0,0 +1,16 @@
+[
+  {
+    "name": "Queue Size",
+    "description": "Queue size check greater than 50",
+    "priority": 1,
+    "condition": "#predictedQueuedCount > 50",
+    "actions": ["#predictedQueuedCount + 'is large'"]
+  },
+  {
+    "name": "Time To Back Pressure",
+    "description": "Back pressure time less than 5 minutes",
+    "priority": 2,
+    "condition": "#predictedTimeToBytesBackpressureMillis >= 300000",
+    "actions": ["'System is approaching backpressure! Predicted time left: ' + #predictedTimeToBytesBackpressureMillis"]
+  }
+]
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_spel_rules.yml b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_spel_rules.yml
new file mode 100644
index 0000000..ecbf612
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/nifi-easyrules-service/src/test/resources/test_spel_rules.yml
@@ -0,0 +1,14 @@
+---
+name: "Queue Size"
+description: "Queue size check greater than 50"
+priority: 1
+condition: "#predictedQueuedCount > 50"
+actions:
+  - "System.out.println(\"Queue Size Over 50 is detected!\")"
+---
+name: "Time To Back Pressure"
+description: "Back pressure time less than 5 minutes"
+priority: 2
+condition: "#predictedTimeToBytesBackpressureMillis >= 300000"
+actions:
+  - "System.out.println(\"Back Pressure prediction less than 5 minutes!\")"
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-easyrules-bundle/pom.xml b/nifi-nar-bundles/nifi-easyrules-bundle/pom.xml
new file mode 100644
index 0000000..a3cded4
--- /dev/null
+++ b/nifi-nar-bundles/nifi-easyrules-bundle/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <!--
+      Licensed to the Apache Software Foundation (ASF) under one or more
+      contributor license agreements. See the NOTICE file distributed with
+      this work for additional information regarding copyright ownership.
+      The ASF licenses this file to You under the Apache License, Version 2.0
+      (the "License"); you may not use this file except in compliance with
+      the License. You may obtain a copy of the License at
+      http://www.apache.org/licenses/LICENSE-2.0
+      Unless required by applicable law or agreed to in writing, software
+      distributed under the License is distributed on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+      See the License for the specific language governing permissions and
+      limitations under the License.
+    -->
+    <parent>
+        <artifactId>nifi-nar-bundles</artifactId>
+        <groupId>org.apache.nifi</groupId>
+        <version>1.10.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>nifi-easyrules-bundle</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>nifi-easyrules-service</module>
+        <module>nifi-easyrules-nar</module>
+    </modules>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.nifi</groupId>
+                <artifactId>nifi-easyrules-service</artifactId>
+                <version>1.10.0-SNAPSHOT</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+</project>
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-rules-engine-service-api/pom.xml b/nifi-nar-bundles/nifi-standard-services/nifi-rules-engine-service-api/pom.xml
new file mode 100644
index 0000000..2916f32
--- /dev/null
+++ b/nifi-nar-bundles/nifi-standard-services/nifi-rules-engine-service-api/pom.xml
@@ -0,0 +1,36 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <!--
+      Licensed to the Apache Software Foundation (ASF) under one or more
+      contributor license agreements.  See the NOTICE file distributed with
+      this work for additional information regarding copyright ownership.
+      The ASF licenses this file to You under the Apache License, Version 2.0
+      (the "License"); you may not use this file except in compliance with
+      the License.  You may obtain a copy of the License at
+          http://www.apache.org/licenses/LICENSE-2.0
+      Unless required by applicable law or agreed to in writing, software
+      distributed under the License is distributed on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+      See the License for the specific language governing permissions and
+      limitations under the License.
+    -->
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>nifi-standard-services</artifactId>
+        <groupId>org.apache.nifi</groupId>
+        <version>1.10.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>nifi-rules-engine-service-api</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-api</artifactId>
+            <version>1.10.0-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+
+</project>
\ No newline at end of file
diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-rules-engine-service-api/src/main/java/org/apache/nifi/rules/Action.java b/nifi-nar-bundles/nifi-standard-services/nifi-rules-engine-service-api/src/main/java/org/apache/nifi/rules/Action.java
new file mode 100644
index 0000000..434808f
--- /dev/null
+++ b/nifi-nar-bundles/nifi-standard-services/nifi-rules-engine-service-api/src/main/java/org/apache/nifi/rules/Action.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.rules;
+
+import java.util.Map;
+
+/**
+ * An Action that should be performed given a fact has met the condition specified in a Rule.
+ * The type of action is dictated by the type field and attributes are used as parameters to configure
+ * the Action's executor/handler
+ */
+public class Action {
+    private String type;
+    private Map<String,String> attributes;
+
+    public Action() {
+    }
+
+    public Action(String type, Map<String, String> attributes) {
+        this.type = type;
+        this.attributes = attributes;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Map<String, String> getAttributes() {
+        return attributes;
+    }
+
+    public void setAttributes(Map<String, String> attributes) {
+        this.attributes = attributes;
+    }
+}
diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-rules-engine-service-api/src/main/java/org/apache/nifi/rules/ActionHandler.java b/nifi-nar-bundles/nifi-standard-services/nifi-rules-engine-service-api/src/main/java/org/apache/nifi/rules/ActionHandler.java
new file mode 100644
index 0000000..7161f11
--- /dev/null
+++ b/nifi-nar-bundles/nifi-standard-services/nifi-rules-engine-service-api/src/main/java/org/apache/nifi/rules/ActionHandler.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.rules;
+
+import java.util.Map;
+
+/**
+ * An ActionHandler executes the provided {@link Action} for a given set of facts
+ */
+public interface ActionHandler {
+    /**
+     * Execute the given action for the provided facts
+     * @param action The action that should be performed by the handler
+     * @param facts The facts that triggered this action
+     */
+    void execute(Action action, Map<String, Object> facts);
+}
diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-rules-engine-service-api/src/main/java/org/apache/nifi/rules/Rule.java b/nifi-nar-bundles/nifi-standard-services/nifi-rules-engine-service-api/src/main/java/org/apache/nifi/rules/Rule.java
new file mode 100644
index 0000000..8adbb21
--- /dev/null
+++ b/nifi-nar-bundles/nifi-standard-services/nifi-rules-engine-service-api/src/main/java/org/apache/nifi/rules/Rule.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.rules;
+
+import java.util.List;
+
+/**
+ *  A Rule that defines a condition that should be met by a set of facts in order to perform
+ *  one or more {@link Action}
+ */
+
+public class Rule {
+    private String name;
+    private String description;
+    private Integer priority;
+    private String condition;
+    private List<Action> actions;
+    private List<String> facts;
+
+    public Rule() {
+    }
+
+    public Rule(String name, String description, Integer priority, String condition, List<Action> actions, List<String> facts) {
+        this.name = name;
+        this.description = description;
+        this.priority = priority;
+        this.condition = condition;
+        this.actions = actions;
+        this.facts = facts;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public Integer getPriority() {
+        return priority;
+    }
+
+    public void setPriority(Integer priority) {
+        this.priority = priority;
+    }
+
+    public String getCondition() {
+        return condition;
+    }
+
+    public void setCondition(String condition) {
+        this.condition = condition;
+    }
+
+    public List<Action> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<Action> actions) {
+        this.actions = actions;
+    }
+
+    public List<String> getFacts() {
+        return facts;
+    }
+
+    public void setFacts(List<String> facts) {
+        this.facts = facts;
+    }
+}
diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-rules-engine-service-api/src/main/java/org/apache/nifi/rules/engine/RulesEngineService.java b/nifi-nar-bundles/nifi-standard-services/nifi-rules-engine-service-api/src/main/java/org/apache/nifi/rules/engine/RulesEngineService.java
new file mode 100644
index 0000000..f00e0ba
--- /dev/null
+++ b/nifi-nar-bundles/nifi-standard-services/nifi-rules-engine-service-api/src/main/java/org/apache/nifi/rules/engine/RulesEngineService.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.rules.engine;
+
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.controller.ControllerService;
+import org.apache.nifi.rules.Action;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * A Controller Service that is responsible for executing rules engine against provided facts.  The subsequent
+ * actions can be executed either by the rules engine or a list of {@link Action} can be returned and interrogated/executed by
+ * the caller.
+ * </p>
+ * </p>
+ */
+@Tags({"rules", "rules-engine","facts","actions"})
+@CapabilityDescription("Specifies a Controller Service which hosts a rules engine, that can be used to determine actions that should be performed given provided facts.")
+public interface RulesEngineService extends ControllerService {
+
+    /**
+     * Returns the list of Actions that should be triggered as determined by the rules engine for the the given facts.
+     * Action in this case have not been executed by the engine.
+     * @param facts a Map of key and facts values, as objects, that should be evaluated by the rules engine
+     * @return a List of Actions that should be triggered
+     */
+    List<Action> fireRules(Map<String, Object> facts);
+
+}
diff --git a/nifi-nar-bundles/nifi-standard-services/nifi-standard-services-api-nar/pom.xml b/nifi-nar-bundles/nifi-standard-services/nifi-standard-services-api-nar/pom.xml
index c5174a9..79ac221 100644
--- a/nifi-nar-bundles/nifi-standard-services/nifi-standard-services-api-nar/pom.xml
+++ b/nifi-nar-bundles/nifi-standard-services/nifi-standard-services-api-nar/pom.xml
@@ -66,6 +66,12 @@
         </dependency>
         <dependency>
             <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-rules-engine-service-api</artifactId>
+            <version>1.10.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
             <artifactId>nifi-schema-registry-service-api</artifactId>
             <scope>compile</scope>
         </dependency>
diff --git a/nifi-nar-bundles/nifi-standard-services/pom.xml b/nifi-nar-bundles/nifi-standard-services/pom.xml
index cfba99f..578ef67 100644
--- a/nifi-nar-bundles/nifi-standard-services/pom.xml
+++ b/nifi-nar-bundles/nifi-standard-services/pom.xml
@@ -46,5 +46,6 @@
         <module>nifi-kerberos-credentials-service-bundle</module>
         <module>nifi-proxy-configuration-api</module>
         <module>nifi-proxy-configuration-bundle</module>
+        <module>nifi-rules-engine-service-api</module>
     </modules>
 </project>
diff --git a/nifi-nar-bundles/pom.xml b/nifi-nar-bundles/pom.xml
index ba27b6c..34e49c9 100755
--- a/nifi-nar-bundles/pom.xml
+++ b/nifi-nar-bundles/pom.xml
@@ -97,7 +97,8 @@
         <module>nifi-jolt-record-bundle</module>
 	<module>nifi-network-bundle</module>
         <module>nifi-prometheus-bundle</module>
-  </modules>
+        <module>nifi-easyrules-bundle</module>
+    </modules>
 
     <build>
         <plugins>
@@ -225,6 +226,12 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.nifi</groupId>
+                <artifactId>nifi-rules-engine-service-api</artifactId>
+                <version>1.10.0-SNAPSHOT</version>
+                <scope>provided</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.nifi</groupId>
                 <artifactId>nifi-distributed-cache-protocol</artifactId>
                 <version>1.10.0-SNAPSHOT</version>
             </dependency>