AI and Business Rule Engines for Excel Power Users: Capture and scale your business knowledge into the cloud – with Microsoft 365, Decision Models, and AI tools from IBM and Red Hat
- Length: 386 pages
- Edition: 1
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2023-03-31
- ISBN-10: 180461954X
- ISBN-13: 9781804619544
- Sales Rank: #8951715 (See Top 100 Books)
A power-packed manual to enhance your decision-making with the application of Business Rules using KIE, Drools, Kogito, MS Excel, Power Automate, Office Script, and MS Forms
Purchase of the print or Kindle book includes a free PDF eBook
Key Features
- Explore the business rule tools by implementing real-world examples to write sophisticated rules
- Discover how decision services solve current business challenges using AI
- Combine rules with workflows and scripting to deploy a cloud-based production environment
Book Description
Microsoft Excel is widely adopted across diverse industries, but Excel Power Users often encounter limitations such as complex formulas, obscure business knowledge, and errors from using outdated sheets. They need a better enterprise-level solution, and this book introduces Business rules combined with the power of AI to tackle the limitations of Excel.
This guide will give you a roadmap to link KIE (an industry-standard open-source application) to Microsoft’s business process automation tools, such as Power Automate, Power Query, Office Script, Forms, VBA, Script Lab, and GitHub. You’ll dive into the graphical Decision Modeling standard including decision tables, FEEL expressions, and advanced business rule editing and testing.
By the end of the book, you’ll be able to share your business knowledge as graphical models, deploy and execute these models in the cloud (with Azure and OpenShift), link them back to Excel, and then execute them as an end-to-end solution removing human intervention. You’ll be equipped to solve your Excel queries and start using the next generation of Microsoft Office tools.
What you will learn
- Use KIE and Drools decision services to write AI-based business rules
- Link Business Rules to Excel using Power Query, Script Lab, Office Script, and VBA
- Build an end-to-end workflow with Microsoft Power Automate and Forms while integrating it with Excel and Kogito
- Collaborate on and deploy your decision models using OpenShift, Azure, and GitHub
- Discover advanced editing using the graphical Decision Model Notation (DMN) and testing tools
- Use Kogito to combine AI solutions with Excel
Who this book is for
This book is for Excel power users, business users, and business analysts looking for a tool to capture their knowledge and deploy it as part of enterprise-grade systems. Working proficiency with MS Excel is required. Basic knowledge of web technologies and scripting would be an added advantage.
Cover Title Page Copyright and Credits Foreword Contributors Table of Contents Preface Part 1: The Problem with Excel, and Why Rule-Based AI Can Be the Solution Chapter 1 - Wrestling with Excel? You Are Not Alone Why do you use Excel? Excel as the engine room of the business Day-to-day Excel problems One solution – separating information and processing instructions Enterprise solutions Examples of enterprise solutions The chasm between Excel and enterprise solutions What’s your real business problem? What these business problems look like in real life Artificial intelligence and which type can help you best What is artificial intelligence? Practical artificial intelligence and business rules The when … then format Triage – life or death business rules Business rules in your organization A business rule engine you already own More powerful business rule engines Splitting Excel into different pieces Other solutions are available Summary Chapter 2 - Choosing an AI and Business Rules Engine – Why Drools and KIE? Are you reading this book for personal or business reasons? Which business rule engine to use What’s in a name – KIE, Kogito, or Drools? Why choose KIE and Drools as our Rule Engine? Open source and the Red Hat and IBM business model How KIE being open source helps you Open can be more secure Asking for help in Drools (or in any open source project) The best way to ask for help in the open source world KIE, Kogito, and Drools resources How to design and build enterprise solutions Working with a team What software architects do Containers supporting Kogito, KIE, and Drools Four different ways to work with business rules Summary Chapter 3 - Your First Business Rule with the Online KIE Sandbox Writing our first business rule KIE Sandbox Extended Services Downloading and running KIE Extended Services Troubleshooting KIE Sandbox Extended Services Running our first rule What is happening behind the scenes – KIE Sandbox and Services More on Decision Models Decision Models aren’t workflows Differences between Decision Models and business rules A tour of the UI What is a variable? What is a type? How to fix these errors Giving our Decision Model a name Previous autosaved decision models Uploading Decision Models from other sources Option 1 – importing the sample Option 2 – step-by-step instructions Other UI elements in KIE Sandbox Note – KIE Sandbox is only a sandbox Summary Part 2: Writing Business Rules and Decision Models – with Real-Life Examples Chapter 4 - More Decision Models, Business Rules, and Decision Tables Make your decision service easy to work with What shape is your data – tables or trees? Modeling our data in the KIE Sandbox Using our complex data type in a decision model Describing our data better using constraints What makes a good custom data type? A more powerful Decision node – Decision Tables Our first Decision table in the KIE Sandbox Decision Tables as your go-to solution (other nodes are available) More nodes that you can use Other types of Decision Nodes Running our function A more sophisticated Decision Table Rule matching and HIT Policies A safer Decision Table example Summary Chapter 5 - Sharing and Deploying Decision Models Using OpenShift and GitHub How deploying to the cloud makes things easier Reality check – why not connect Excel to the local KIE Sandbox? OpenShift – Red Hat’s piece of the cloud Signing up for the OpenShift Developer Sandbox Accessing your OpenShift Developer Sandbox Linking KIE Sandbox and your OpenShift instance Deploying your decision model to OpenShift Important notes on the OpenShift Developer Sandbox Taking care of your data Saving and sharing your decision models using GitHub Signing up for GitHub and getting your token A tour of your personal homepage on GitHub Using your token to collaborate on KIE Sandbox GitHub flows for saving and project collaboration Summary Chapter 6 - Calling Business Rules from Excel Using Power Query Prerequisites Five different ways to link rules, AI, decision models, and Excel VBA Script Lab and Office Scripts Microsoft Power Automate Power Query Machine-readable web pages using REST A simple REST example More on REST – GET and POST requests Swagger – a more human-friendly link to Kogito Exploring Product Recommendation Service Some vital information – service endpoint and contents Other desktop REST clients – HTTPie Calling the decision service using Power Query A simple Power Query REST example Using Power Query REST data in Excel Passing parameters into Power Query – things we need to know The Power Query M language and the advanced editor Referencing an Excel named range using M in Power Query Calling the decision service using parameters When to use Power Query Summary Part 3: Extending Excel, Decision Models, and Business Process Automation into a Complete Enterprise Solution Chapter 7 - Using Business Rules in Excel with Visual Basic, Script Lab, or Office Scripts Calling decision services using Visual Basic for Applications Security checks in running Excel macros Sending JSON calls via VBA to our decision service Extending our example Fixing project references Next steps after VBA Meet Microsoft Script Lab – a modern version of VBA Tour of Script Lab Saving projects in Script Lab Importing scripts into Script Lab Hello World in Script Lab Calling our decision service from Script Lab What is Office Scripts? Getting familiar with the Office Scripts environment Calling our decision service from Office Scripts Lots of choices – but which one to link with? Summary Chapter 8 - Using AI and Decision Services Within Power Automate Workflows Prerequisites What is a workflow? Differences between business rules and workflows What is (and why) Power Automate? Getting started with Power Automate online Our first Power Automate flow A Power Automate flow to call our decision service Preparing our Excel output table Creating our flow to call the decision service Running our updated example Modeling our customer service flow in Power Automate Introduction to Microsoft Forms Updating our Power Automate flow Running our customer service Power Automate flow Suggestions to expand this example Other workflows – Kogito Business Automation and Power Automate Desktop Power Automate Desktop A quick look at Kogito business automation Summary Chapter 9 - Advanced Expressions, Decision Models, and Testing Prerequisites and pre-reading DMN and FEEL expressions – extending what you know Dynamic lists, contexts, and relations More on manipulating lists using FEEL expressions Lambda functions Ranges instead of sequential lists Relations – tables of information Dynamic contexts Graphical contexts More on building and editing decision models Common decision patterns Another pattern – linking decision models together Linking the Bill of Materials example Testing and breaking your rules (before somebody else does) Agile, Scrum, and test-driven development Run ... as Table Test cases using Excel Scenario testing and simulation Summary and further reading Part 4: Next Steps in AI, Machine Learning, and Rule Engines Chapter 10 - Scaling Rules in Business Central with Docker and the Cloud Prerequisites Comparing business central and the KIE sandbox Containers, Docker, and getting help Installing Docker Preparing your Docker Hub account Downloading and installing the Docker software Running Docker and a tour of Docker Desktop First time use of Docker Desktop Running a simple Hello World image in Docker Running the Business Central rule editor in Docker Opening the Business Central rule editor Scenario Simulation and testing in Business Central Setting up our test scenarios Running our test scenarios The KIE Server in Docker and Azure Replacing the KIE Extended Services Running the KIE Server in Docker Running Business Central and the KIE Server – Docker Compose Can we deploy the KIE Server onto Azure or other cloud providers? Roundup of decision model deployment options Summary Chapter 11 - Rules-Based AI and Machine Learning AI – Combining the Best of Both Technical requirements Business rules as preparation for Machine Learning Graphical introduction to Machine Learning Looking at the sales data from our online chocolate shop Introduction to notebooks and Python Naïve Bayes and other classifiers Training models in Azure Machine Learning Setting up Azure Machine Learning Step-by-step training of the Machine Learning model Deploying the two AIs together (ML and rules) A decision service combining rules and ML Key points in importing ML models to decision models Running our integrated model Summary Further reading Chapter 12 - What Next? A Look inside Neural Networks, Enterprise Projects, Advanced Rules, and the Rule Engine Technical requirements Another machine learning method – decision trees Decision trees and decision tables Neural networks in machine learning A neural network implemented in Excel Training our neural network – can you do better? You already have tools to train neural networks Neural networks – more powerful but less explainable Ethics and explainability in decision making – how KIE helps Business rules are explainable by default Explainability in machine learning Executing combined rules and machine learning models Running the KIE machine learning samples using Java and VS Code What next from here – exploring other models and building your own Executing machine learning and rule models in Business Central Alternative – integrating rules and ML in a Power Automate flow Calling the machine learning model from Power Automate Red Piranha as a template enterprise project Running the Red Piranha Docker image Running your own files in Red Piranha A look inside the Red Piranha project using Codespaces and VS Code Advanced DRL rules in VS Code and Business Central Individual DRL rules versus decision tables Why are rule engines and decision models so fast? The RETE and PHREAK approach to running rules (fast) Summary What we’ve learned in this book Appendix A - Introduction to Visual Basic for Applications Introduction to macros and VBA Appendix B - Testing Using VSCode, Azure, and GitHub Codespaces Getting started with VSCode and Codespaces Setting up scenario testing in VSCode Running scenario testing in VSCode Alternative method – starting with Kogito scenario samples Running VSCode on your laptop Appendix C - Troubleshooting Docker Preparing your laptop for Docker Switching between Hyper-V and WSL Troubleshooting Docker – some obvious things Troubleshooting Hyper-V and WSL More help on Docker Index Other Books You May Enjoy
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: AI and Business Rule Engines for Excel Power Users: Capture and scale your business knowledge into the cloud – with Microsoft 365, Decision Models, and AI tools from IBM and Red Hat
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.