Announcing the Public Preview of the Azure Logic Apps Rules Engine!

Azure Integration Services Blog > Announcing the Public Preview of the Azure Logic Apps Rules Engine!

https://techcommunity.microsoft.com/t5/azure-integration-services-blog/announcing-the-public-preview-of-the-azure-logic-apps-rules/ba-p/4163317

Business rules engines offer a low-code environment that lets you build applications faster and easier, reducing dependencies on programming. Rules engine help to create and change business logic without having to write code or restart the applications that use them. Also, In a world of microservices that promotes decoupling, rules engines provide consistency, clarity, and compliance across different services and domains. Those are some of the benefits of using a Rules Engine.


 


BizTalk Server includes a Business Rules Engine. We have incorporated the RETE runtime included in the product along with support of .net and XML facts into Azure Logic Apps. This means that customers migrating from BizTalk Server can leverage their existing BRE implementations in Azure Logic Apps now. This includes our customers looking to migrate their BizTalk Server SWIFT solutions to Azure Logic Apps. 


 


hcamposu_0-1717888676146.png


 


 


The Microsoft Rules Composer


 


To help you create rules for use with your Azure Logic Apps Rules Engine project, the Microsoft Rules Composer provides a visual tool for authoring and versioning rulesets and vocabularies. It is an stand along application that can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=106092.


 


hcamposu_1-1717888676152.png


 


 


Rules


 


Rules are declarative statements that include a condition and actions where the condition is evaluated. If the result is true, the rules engine performs one or more actions. The following diagram shows the relationship between Rulesets, Rules, Facts, Conditions and Actions:


 


hcamposu_2-1717888676167.png


 


 


What are Vocabularies?


 


Vocabularies are collections of definitions consisting of friendly names for the facts used in rule conditions and actions. They make the rules easier to read, understand, and share by people in a particular business domain. For instance: “Status”. Vocabularies can be of the following types:



  • Constant Value

  • Range of Values

  • Set of Values


 


hcamposu_3-1717888676170.png


 


Control functions and Forward Chaining


 


Control functions help applications to control the facts in the engine’s behavior. Facts in working memory drive the conditions that the engine evaluates and the actions that execute. An example of this is the Forward Chaining Inference. The Forward Chaining Inference finds all true statements given the knowledge base and a new set of facts. It uses the control function “Update”.


hcamposu_4-1717888676172.png


 


Testing Rules


 


The Microsoft Rules Composer follows a Shift left approach: As you build your rulesets so that you can integrate business logic with your Standard workflows, you can test your ruleset incrementally. This feature is recommended for long or complex rules, to avoid lengthy troubleshooting.


 


hcamposu_5-1717888676173.png


 


To test .net facts, you should build a Fact creator. You don’t need Fact creators for XML facts.


hcamposu_6-1717888676174.png


 


The outcome is a trace window with the results of the evaluation of the rules.


 


hcamposu_7-1717888676176.png


 


 


Migrating from BizTalk Server


 


As the Logic Apps Rules Engine, is an evolution of the BizTalk Business Rules Engine (BRE), BRE rules can be used in Logic Apps. As policies no longer exist, you should export each policy individually.


 


hcamposu_8-1717888676178.png


 


As DBFacts are not supported in this release, you need to remove them from your policies or refactor them.


 


Creating Rules in VSCode


 


You can create Rules Engine projects using VSCode. You should create a Logic Apps workspace and then a Logic app with rules engine project.


 


hcamposu_9-1717888676181.png


 


For a complete demonstration on how to use the Azure Logic Apps Rules Engine, watch the following video:


 



 


Feedback?


 


If you have any feedback after testing this feature, please use this link: Rules Engine Feedback.


 

Leave a comment