PV207 BPM Software and Services for Business Automation Mgr. Marian Macik Senior Software Quality Engineer April 2023 1 2 DOMAIN-DRIVEN DESIGN (DDD) Domain-driven design is a concept that the structure and language of software code should match the business domain. ● Eases communication ● Improves flexibility ● Emphasizes domain over interface ● Requires robust domain expertise ● Encourages iterative practices ● Ill-suited for highly technical projects 3 DOMAIN-DRIVEN DESIGN (DDD) 4 BUSINESS AUTOMATION MAPPING AUTOMATION OPTIMIZATION MARKET 5 Low Code Platforms DPA Platforms Cloud Services Communities (Object Management Group, Cloud Native Computing Foundation, Kubernetes, Knative, KIE, Kogito) DPA SOFTWARE FROM FORRESTER ANALYST REPORT ‘21 6 AUTOMATION OF WORKFLOWS 7 SERVERLESS WORKFLOW 8 ● Similar specification to BPMN but aimed more at developers ● More lightweight, no human tasks, targeted at machine interaction ● Workflow is “modelled” directly by writing the code (JSON/YAML), currently doesn’t define graphical notation ● Higher level than BPM, focuses more on orchestration of services or infrastructure in the cloud, self-healing infrastructure ● Background service, end users don’t interact directly with it (as with BPM in loan approval, order processing…) ● https://serverlessworkflow.io/ ● BPMN vs. SWF AUTOMATION OF WORKFLOWS 9 AUTOMATION OF EVENT-DRIVEN WORKFLOWS 10 Event broker AUTOMATION OF LONG-LIVED TRANSACTIONS 11 Saga pattern for microservice architectures If any microservice fails to complete its local transaction, the other microservices will run compensation transactions to rollback the changes. Advantages ● support for long-lived transactions ● other microservices are not blocked if a microservice is running for a long time ● there is no lock on any object Disadvantages ● difficult to debug ● difficult to maintain if the system gets complex ● does not have read isolation Adding a process manager addresses the complexity issue of the Saga pattern when it becomes responsible for listening to events and triggering endpoints. AUTOMATION OF TASK ASSIGNMENTS 12 [KIELive#45] Optimizing user tasks assignment in business processes with Kogito and OptaPlanner AUTOMATION OF HUMAN ACTIONS INTERACTING WITH SW 13 Robotic Process Automation (RPA) AUTOMATION OF BUSINESS RULES 14 Kogito DRL Rules language Policy "change customers in the Gold category to the Platinum category when they spend more than $1,500 in a single transaction" Action Rule If All of the following conditions are true: - the customer category is Gold - the value of the shopping cart is more than $ 1,500 Then Change the customer category to Platinum IBM Action rules express business policy statements using a predefined business vocabulary that can be interpreted by a computer. AUTOMATION OF DECISION TABLES 15 Types of decisions ● Selection (routing) ● Scoring ● Categorizing The decision doesn't take an action (no side effect), just determines a data value AUTOMATION OF DECISION MODELS 16 AUTOMATION OF DECISION MODELS 17 Executing decision logic in DMN models /* = Actual input data = */ "Violation": { "Type": "speed", "Speed Limit": 60, "Actual Speed": 100 } /* = Expected output data = */ "Fine": { "Points": 7, "Amount": 1000 } DMN with Kogito on Quarkus DMN FEEL Cheatsheet AUTOMATION OF DECISION MAKING IN STREAMS 18 Event broker 1. Streaming event data to be evaluated by the decision model Event broker 2. Streaming decision results AUTOMATION OF DECISION MAKING WITH AI 19 TrustyAI Can you trust AI? - presentation AUTOMATION OF SCORING 20 Scorecard is a risk management tool used mostly by banks to calculate the risk they take by selling you one of their products. How risky is a customer? What are the changes the customer might default on payment? Based on the customer score we may adapt the product offer - a better interest rate, a higher credit limit, etc. PMML Scorecard Editor in VS Code AUTOMATION OF HUMAN-LIKE CONVERSATIONS 21 A chatbot is software that simulates human-like conversations with users via text messages on chat or text-to-speech. ● Customer self-service - call centres, scheduling doctor appointments ● Employee self-service - HR assistants, meeting and scheduling, expenses, people finder Omnichannel - communication is done on all kinds of channels - phone calls, chat and email on computers, sms messages, … Watson Assistant - COVID-19 response automation Chatbots AUTOMATION OF BUSINESS MONITORING 22 KPI Dependency Tree 12 12 22 15 23 3630 Alerts, triggers, … 23 Choose the right software and services to fit your needs Kogito Cloud-native business automation for building intelligent applications, backed by battle-tested capabilities. 24 25 KOGITO ● Domain-Driven Development ● Generated Domain-specific APIs from your BPMN and DMN models ● Lightweight orchestration microservices ● Event-driven business logic ● Dev-mode hot reload ● Distributed sagas for microservices ● Serverless workflows ● Polyglot programming More info at ● Blogs ● Youtube https://kogito.kie.org/ 26 KOGITO DEMO ● Available on GitHub ○ git clone https://github.com/MarianMacik/kogito-intro.git ○ cd kogito-intro-quarkus ● Contains BPMN and DMN integration ● Development mode with hot reload ○ mvn clean compile quarkus:dev ● Compile ○ mvn clean install ● Domain-specific API available at http://localhost:8080/q/swagger-ui/ ○ OpenAPI specification Thank you, questions? 27