SlideShare uma empresa Scribd logo
1 de 78
Baixar para ler offline
Kogito: Cloud-native
Business Automation
Mario Fusco, Edoardo Vacchi
Mario Fusco
Red Hat Principal Sw Engineer
Drools project lead
Kogito founder
Java Champion
Edoardo Vacchi
Red Hat Senior Sw Engineer
Kogito founder
Agenda
● Business automation in the cloud: a
serverless workflow - demo
● What is business automation:
introduction to Drools and jBPM
● Kogito: business automation in the cloud
● Quarkus: an open source stack
to write cloud native Java apps
● Decisions as a service:
serverless DMN - demo
+
● World around us has changed
● Different usage patterns
● New deployment techniques
● Better usage of machine and cluster resources
The reasons for a change
Application Density
CONTAINER ORCHESTRATION
Server Server Server
Traditional Java
Stack
NodeJS
NodeJS
NodeJS
NodeJS
NodeJS
NodeJS
Traditional Java
Stack
Traditional Java
Stack
Go Go Go
Go Go Go
Go Go Go
Go Go Go
Go Go Go
Go Go Go
Application Density
CONTAINER ORCHESTRATION
Server Server Server
NodeJS
NodeJS
NodeJS
NodeJS
NodeJS
NodeJS
Go Go Go
Go Go Go
Go Go Go
Go Go Go
Go Go Go
Go Go Go
Native Java
Native Java
Native Java
Native Java
Native Java
Native Java
Native Java
Native Java
Native Java
Native Java
Native Java
Native Java
“I am your density”
Traditional vs. Modern
Kubernetes OpenShift Jaeger Apache Kafka
Cloud-Native Development
Serverless
“building and running applications that do not
require server management. It describes a
finer-grained deployment model where
applications, bundled as one or more
functions, are uploaded to a platform and then
executed, scaled, and billed in response to the
exact demand needed at the moment.”
event
action
result$
CNCF Serverless Whitepaper v1.0
Function Orchestration
f g
Workflows
● Workflow is the procedural
movement of information,
material, and tasks from one
participant to another
● A workflow may be sequential,
with each step contingent upon
completion of the previous
one, or parallel, with multiple
steps occurring simultaneously
Serverless Workflows
serverlessworkflow.io
id: ...
version: '1.0'
name: ...
description: ...
functions:
- ...
events:
- ...
states:
- ...
Hello World
id: helloworld
version: '1.0'
name: Hello World Workflow
description: Inject Hello World
states:
- name: Hello State
type: inject
start:
kind: default
data:
result: Hello World!
end:
kind: default
id: greeting
version: '1.0'
name: Greeting Workflow
description: Greet Someone
functions:
- name: greetingFunction
resource: functionResourse
states:
- name: Greet
type: operation
start:
kind: default
actions:
- functionRef:
refName: greetingFunction
parameters:
name: "{{ $.person.name }}"
actionDataFilter:
dataResultsPath: "{{ $.greeting }}"
end:
kind: default
Hello World (2)
Knative
Serving
An event-driven model
that serves the container
with your application and
can "scale to zero".
Eventing
Common infrastructure for
consuming and producing
events that will stimulate
applications.
Kogito
Business Automation in the Cloud
Cogito, ergo sum
Pronunciation
/ˈko.d͡ ʒi.to/, [ˈkoː.d͡ ʒi.to]
(Don't worry, nobody in the team gets it right, anyway)
see also: http://kverlaen.blogspot.com/2019/09/etymology-of-kogito.html
René Descartes
Kogito, ergo automate
● BTW, this is not Mario
● Not a pirate
● It is a viking
● Odin, who sacrificed his eye for
knowledge
● A cloud-native development, deployment and
execution platform for business automation:
○ Rules and Decisions
○ Processes and Cases
○ Serverless Workflow
● ... under the covers
○ the backbone is code generation based on business assets
○ executable model for the process/rule/decision definitions
○ type safe data model that encapsulates variables
○ REST api for each public business process/decision/rule
Introducing Kogito
Kogito Operator
● Responsible for building with selected runtime
○ Quarkus
○ Spring Boot
● Provision services on demand and remove them when no longer needed
● Manage deployed services including their dependencies
● Service discovery based on labels
● Guarding services of losing their dependants
● Security provisioning and propagation
Operator
● Deploy and manage your services with operator and intuitive CLI tool
$ kogito new-app my-app
Create new project with default services provisioned
$ kogito deploy my-app https://github.com/user/myapp
Deploys given application from source and attaches to required infrastructure
Operator centric
Serverless Workflow
A Complete Example
id: yamlgreet
version: '1.0'
name: Greeting workflow
description: YAML based greeting workflow
functions:
- name: greetFunction
type: sysout
states:
- name: ChooseOnLanguage
type: switch
start:
kind: default
dataConditions:
- path: "$.language"
value: English
operator: equals
transition:
nextState: GreetInEnglish
- path: "$.language"
value: Spanish
operator: equals
transition:
nextState: GreetInSpanish
default:
nextState: GreetInEnglish
- name: GreetInEnglish
type: inject
data:
greeting: 'Hello from YAML Workflow, '
transition:
nextState: GreetPerson
- name: GreetInSpanish
type: inject
data:
greeting: 'Saludos desde YAML Workflow, '
transition:
nextState: GreetPerson
- name: GreetPerson
type: operation
actions:
- name: greetAction
functionRef:
refName: greetFunction
parameters:
message: "$.greeting $.name"
end:
kind: terminate
GreetInSpanish GreetInEnglish
ChooseOnLanguage
GreetPerson
{
"workflowdata": {
"name" : "John",
"language": "English"
}
}
language == "Spanish" language == "English"
(default)
GreetInSpanish GreetInEnglish
ChooseOnLanguage
GreetPerson
language == "Spanish" language == "English"
(default)
- name: ChooseOnLanguage
type: switch
start:
kind: default
dataConditions:
- path: "$.language"
value: English
operator: equals
transition:
nextState: GreetInEnglish
- path: "$.language"
value: Spanish
operator: equals
transition:
nextState: GreetInSpanish
default:
nextState: GreetInEnglish
GreetInSpanish GreetInEnglish
ChooseOnLanguage
GreetPerson
language == "Spanish" language == "English"
(default)
- name: GreetInEnglish
type: inject
data:
greeting: 'Hello from YAML Workflow, '
transition:
nextState: GreetPerson
- name: GreetInSpanish
type: inject
data:
greeting: 'Saludos desde YAML Workflow, '
transition:
nextState: GreetPerson
- name: GreetPerson
type: operation
actions:
- name: greetAction
functionRef:
refName: greetFunction
parameters:
message: "$.greeting $.name"
Serverless Workflow
Knative Demo
Business Automation
What is Business Automation
● Processes
Set of activities and tasks that,
once completed following a
specific workflow, will accomplish
an organizational goal
● Rules
Encapsulate domain and define
business-specific constraints and
behaviors, keeping them
separated from the main
application flow
Drools
A Rule Engine
What is a Rule
● A business rule is a piece of logic that captures "what to do" depending
on a context (Facts)
● Usually captured in natural language first
WHEN <CONDITIONS>
THEN <ACTIONS>
Introducing Drools
● Easier to understand → Requirements can be more naturally translated
into rules. It is more likely for a technically skilled business analyst to verify,
validate or even change a rule than a piece of Java code
● Improved maintainability → We don't care about how to implement a
solution only what needs to be done to solve a problem
● Deals with evolving complexity → It's easier to modify a rule than a Java
program and to determine the impact of this change on the rest of the
application
● Modularity → Each rule models an isolated and small portion of your
business logic and is not part of a monolithic program
● Clear separation of business logic from the rest of the system →
Business and infrastructural code have very different life cycles
● Complex Event Processing → Facts can be handled like timestamped
events allowing temporal reasoning on them
RULES
How a Rule Engine Works
● The Rule Base contains a computation efficient
representation of the set of the defined rules
● The Working Memory contains the set of facts
inserted into session
● The engine matches the fact in the working
memory against the rules set
● When a match is found it creates an activation
and puts it into the agenda
● An activation is the tuple of facts matching the
conditions of a rule plus the rule itself
● When all activations have been created the
agenda elects through a conflict resolution
strategy the one to be executed first
● The elected activation is passed to the
execution engine and then fired
A simple rule set
rule RaiseAlarm when
exists Fire()
then
insert( new Alarm( "house1" ) );
System.out.println( "Raise the Alarm");
end
rule CancelAlarm when
not Fire()
a : Alarm()
then
delete( a );
System.out.println( "Cancel the Alarm");
end
rule TurnSprinklerOn when
s : Sprinkler( on == false )
f : Fire( room == s.room )
then
modify( s ) { setOn( true ) }
System.out.println( "Turn on the sprinkler for room " +
f.getRoom().getName() );
end
rule TurnSprinklerOff when
s : Sprinkler( on == true )
not Fire( room == s.room )
then
modify( s ) { setOn( false ) }
System.out.println( "Turn off the sprinkler for room " +
s.getRoom().getName() );
end
rule OK when
not Alarm()
not Sprinkler( on == true )
then
System.out.println( "Everything is ok" );
end
Pattern-matching
against objects in the
Working Memory
Code executed when
a match is fired
jBPM
A Workflow Engine
Almost anything in any
domain can be expressed
as process or rule.
It’s a matter of recognizing
patterns to be able to avoid
repetition and mistakes, and
by that automating
business.
jBPM provides various capabilities that simplify and externalize business
logic into reusable assets such as cases, processes, decision tables and
more. It consists of:
● business processes (BPMN2)
● case management (BPMN2 and CMMN)
● decision management (DMN)
● business rules (DRL)
A toolkit for building business
applications to help automate
business processes and decisions
jBPM … a business process
Kogito
ergo domain
● Adapts to your business domain instead of
the other way around
● No more leaking abstractions of the platform
into your client applications
● Stay focused on business requirements
instead of implementation technology
Focus on business domain
instead of technology
Kogito
ergo power
● Achieve instant developer efficiency by having
○ Tooling embeddable wherever you need it
○ Code generation taking care of 80% of the work
○ Flexibility to customize, only use what you need
○ Simplified local development with live reload
Offers a powerful developer experience
Kogito
ergo cloud
● If you think about business automation think about the cloud as this is
where your business logic lives these days
● Achieves amazingly fast boot time and low memory footprint by
leveraging newest technology
○ Quarkus
○ Kubernetes/OpenShift/KNative
Designed from ground up to run at scale
Quarkus
Supersonic Subatomic Java
Introducing Quarkus
● A Framework for writing (fast and lightweight)
Java applications
● A Framework for writing (fast and lightweight)
Java applications
● Code generation reduces startup time and
memory footprint (bonus: GraalVM native image)
Introducing Quarkus
● A Framework for writing (fast and lightweight)
Java applications
● Code generation reduces startup time and
memory footprint (bonus: GraalVM native image)
● Exposes existing standard
○ Servlet
○ JAX-RS
○ JPA, JDBC
○ CDI
○ Bean Validation
○ Transactions
○ Logging
○ Microprofile
Introducing Quarkus
Quarkus Extensions
Why Quarkus
Hot Reload
● ./mvn compile quarkus:dev makes
Quarkus run in dev mode and provide
hot-reload capabilities
● Changes made to source and
configuration files are automatically
re-compiled once the browser is
refreshed
● Thanks to Kogito’s Quarkus extension,
also Drools and jBPM files are
recognized as hot reloadable
artifacts and the corresponding rules
and processes are regenerated
Kogito
Architecture
Architecture
Automatic REST endpoint generation
&
Scaffolding
rule LargeDepositApprove when
$l: /loanApplications[ applicant.age >= 20, deposit >= 1000, amount <= maxAmount ]
then
modify($l) { setApproved(true) };
end
query FindApproved
$l: /loanApplications[ approved ]
end
rule LargeDepositApprove when
$l: /loanApplications[ applicant.age >= 20, deposit >= 1000, amount <= maxAmount ]
then
modify($l) { setApproved(true) };
end
query FindApproved
$l: /loanApplications[ approved ]
end
@Path("/find-approved")
public class LoanUnitQueryFindApprovedEndpoint {
@javax.inject.Inject()
RuleUnit<org.kie.kogito.queries.LoanUnit> ruleUnit;
@POST()
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public List<LoanApplication> executeQuery(LoanUnit unitDTO) {
RuleUnitInstance<LoanUnit> instance = ruleUnit.createInstance(unitDTO);
return instance.executeQuery(LoanUnitQueryFindApproved.class);
}
}
Automatically
generate REST
endpoint
DMN
Decisions as a Service
What is DMN?
● DMN (Decision Model and Notation) is a standard for Decision
Management from OMG
● Standardizes decision automation from modelling to execution
● A sibling and complementary standard to BPMN (processes) and
CMMN (case management)
● A complement to analytics and AI models in general
○ DMN integrates with analytic models and provides explainable
white box decisions
● DMN models are stateless only (perfect fit for serverless architectures)
DMN introduction: a simple example
DMN introduction: a simple example
Input Node
Decision Node
Business Knowledge
Model
DMN & Hot Reload - Demo
Decisions as a Service
Questions?
Get started
http://kogito.kie.org

Mais conteúdo relacionado

Mais procurados

Spring Framework Petclinic sample application
Spring Framework Petclinic sample applicationSpring Framework Petclinic sample application
Spring Framework Petclinic sample applicationAntoine Rey
 
APIs in a Microservice Architecture
APIs in a Microservice ArchitectureAPIs in a Microservice Architecture
APIs in a Microservice ArchitectureWSO2
 
Server monitoring using grafana and prometheus
Server monitoring using grafana and prometheusServer monitoring using grafana and prometheus
Server monitoring using grafana and prometheusCeline George
 
Communication in a Microservice Architecture
Communication in a Microservice ArchitectureCommunication in a Microservice Architecture
Communication in a Microservice ArchitecturePer Bernhardt
 
Platform engineering 101
Platform engineering 101Platform engineering 101
Platform engineering 101Sander Knape
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservicesAnil Allewar
 
Kubermatic CNCF Webinar - start.kubermatic.pdf
Kubermatic CNCF Webinar - start.kubermatic.pdfKubermatic CNCF Webinar - start.kubermatic.pdf
Kubermatic CNCF Webinar - start.kubermatic.pdfLibbySchulze
 
Backstage at CNCF Madison.pptx
Backstage at CNCF Madison.pptxBackstage at CNCF Madison.pptx
Backstage at CNCF Madison.pptxBrandenTimm1
 
Introduction to Spring Cloud
Introduction to Spring Cloud           Introduction to Spring Cloud
Introduction to Spring Cloud VMware Tanzu
 
Getting started with Next.js - IM Tech Meetup - Oct 2022.pptx
Getting started with Next.js - IM Tech Meetup - Oct 2022.pptxGetting started with Next.js - IM Tech Meetup - Oct 2022.pptx
Getting started with Next.js - IM Tech Meetup - Oct 2022.pptxIlesh Mistry
 
Let's build Developer Portal with Backstage
Let's build Developer Portal with BackstageLet's build Developer Portal with Backstage
Let's build Developer Portal with BackstageOpsta
 
Managing Terraform Module Versioning and Dependencies
Managing Terraform Module Versioning and Dependencies Managing Terraform Module Versioning and Dependencies
Managing Terraform Module Versioning and Dependencies Nebulaworks
 

Mais procurados (20)

Spring Framework Petclinic sample application
Spring Framework Petclinic sample applicationSpring Framework Petclinic sample application
Spring Framework Petclinic sample application
 
APIs in a Microservice Architecture
APIs in a Microservice ArchitectureAPIs in a Microservice Architecture
APIs in a Microservice Architecture
 
Server monitoring using grafana and prometheus
Server monitoring using grafana and prometheusServer monitoring using grafana and prometheus
Server monitoring using grafana and prometheus
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Communication in a Microservice Architecture
Communication in a Microservice ArchitectureCommunication in a Microservice Architecture
Communication in a Microservice Architecture
 
Platform engineering 101
Platform engineering 101Platform engineering 101
Platform engineering 101
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
React Hooks
React HooksReact Hooks
React Hooks
 
Kubermatic CNCF Webinar - start.kubermatic.pdf
Kubermatic CNCF Webinar - start.kubermatic.pdfKubermatic CNCF Webinar - start.kubermatic.pdf
Kubermatic CNCF Webinar - start.kubermatic.pdf
 
Backstage at CNCF Madison.pptx
Backstage at CNCF Madison.pptxBackstage at CNCF Madison.pptx
Backstage at CNCF Madison.pptx
 
An introduction to DevOps
An introduction to DevOpsAn introduction to DevOps
An introduction to DevOps
 
Introduction to Spring Cloud
Introduction to Spring Cloud           Introduction to Spring Cloud
Introduction to Spring Cloud
 
Terraform
TerraformTerraform
Terraform
 
Spring Security 5
Spring Security 5Spring Security 5
Spring Security 5
 
Getting started with Next.js - IM Tech Meetup - Oct 2022.pptx
Getting started with Next.js - IM Tech Meetup - Oct 2022.pptxGetting started with Next.js - IM Tech Meetup - Oct 2022.pptx
Getting started with Next.js - IM Tech Meetup - Oct 2022.pptx
 
Git best practices workshop
Git best practices workshopGit best practices workshop
Git best practices workshop
 
Let's build Developer Portal with Backstage
Let's build Developer Portal with BackstageLet's build Developer Portal with Backstage
Let's build Developer Portal with Backstage
 
Managing Terraform Module Versioning and Dependencies
Managing Terraform Module Versioning and Dependencies Managing Terraform Module Versioning and Dependencies
Managing Terraform Module Versioning and Dependencies
 

Semelhante a Kogito: cloud native business automation

Advantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processingAdvantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processingGabor Paller
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsVikash Singh
 
Zend server 6 using zf2, 2013 webinar
Zend server 6 using zf2, 2013 webinarZend server 6 using zf2, 2013 webinar
Zend server 6 using zf2, 2013 webinarYonni Mendes
 
How and why I turned my old Java projects into a first-class serverless compo...
How and why I turned my old Java projects into a first-class serverless compo...How and why I turned my old Java projects into a first-class serverless compo...
How and why I turned my old Java projects into a first-class serverless compo...Mario Fusco
 
OSMC 2012 | Shinken by Jean Gabès
OSMC 2012 | Shinken by Jean GabèsOSMC 2012 | Shinken by Jean Gabès
OSMC 2012 | Shinken by Jean GabèsNETWAYS
 
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...Amazon Web Services
 
Architecting single-page front-end apps
Architecting single-page front-end appsArchitecting single-page front-end apps
Architecting single-page front-end appsZohar Arad
 
Behind the curtain - How Django handles a request
Behind the curtain - How Django handles a requestBehind the curtain - How Django handles a request
Behind the curtain - How Django handles a requestDaniel Hepper
 
Building a serverless company on AWS lambda and Serverless framework
Building a serverless company on AWS lambda and Serverless frameworkBuilding a serverless company on AWS lambda and Serverless framework
Building a serverless company on AWS lambda and Serverless frameworkLuciano Mammino
 
Saltstack - Orchestration & Application Deployment
Saltstack - Orchestration & Application DeploymentSaltstack - Orchestration & Application Deployment
Saltstack - Orchestration & Application Deploymentinovex GmbH
 
From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)Jose Manuel Pereira Garcia
 
Angular 16 – the rise of Signals
Angular 16 – the rise of SignalsAngular 16 – the rise of Signals
Angular 16 – the rise of SignalsCoding Academy
 
BDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User StoriesBDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User StoriesSauce Labs
 
Introduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.comIntroduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.comVan-Duyet Le
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteorSapna Upreti
 

Semelhante a Kogito: cloud native business automation (20)

Advantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processingAdvantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processing
 
Node
NodeNode
Node
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Zend server 6 using zf2, 2013 webinar
Zend server 6 using zf2, 2013 webinarZend server 6 using zf2, 2013 webinar
Zend server 6 using zf2, 2013 webinar
 
How and why I turned my old Java projects into a first-class serverless compo...
How and why I turned my old Java projects into a first-class serverless compo...How and why I turned my old Java projects into a first-class serverless compo...
How and why I turned my old Java projects into a first-class serverless compo...
 
OSMC 2012 | Shinken by Jean Gabès
OSMC 2012 | Shinken by Jean GabèsOSMC 2012 | Shinken by Jean Gabès
OSMC 2012 | Shinken by Jean Gabès
 
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
Monitoring as Code: Getting to Monitoring-Driven Development - DEV314 - re:In...
 
Architecting single-page front-end apps
Architecting single-page front-end appsArchitecting single-page front-end apps
Architecting single-page front-end apps
 
Behind the curtain - How Django handles a request
Behind the curtain - How Django handles a requestBehind the curtain - How Django handles a request
Behind the curtain - How Django handles a request
 
Building a serverless company on AWS lambda and Serverless framework
Building a serverless company on AWS lambda and Serverless frameworkBuilding a serverless company on AWS lambda and Serverless framework
Building a serverless company on AWS lambda and Serverless framework
 
Nodejs
NodejsNodejs
Nodejs
 
Saltstack - Orchestration & Application Deployment
Saltstack - Orchestration & Application DeploymentSaltstack - Orchestration & Application Deployment
Saltstack - Orchestration & Application Deployment
 
From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)
 
Angular 16 – the rise of Signals
Angular 16 – the rise of SignalsAngular 16 – the rise of Signals
Angular 16 – the rise of Signals
 
BDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User StoriesBDD Selenium for Agile Teams - User Stories
BDD Selenium for Agile Teams - User Stories
 
Dancing with websocket
Dancing with websocketDancing with websocket
Dancing with websocket
 
Introduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.comIntroduce about Nodejs - duyetdev.com
Introduce about Nodejs - duyetdev.com
 
Angularjs
AngularjsAngularjs
Angularjs
 
Mobile optimization
Mobile optimizationMobile optimization
Mobile optimization
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteor
 

Mais de Mario Fusco

Let's make a contract: the art of designing a Java API
Let's make a contract: the art of designing a Java APILet's make a contract: the art of designing a Java API
Let's make a contract: the art of designing a Java APIMario Fusco
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modelingMario Fusco
 
Drools 6 deep dive
Drools 6 deep diveDrools 6 deep dive
Drools 6 deep diveMario Fusco
 
OOP and FP - Become a Better Programmer
OOP and FP - Become a Better ProgrammerOOP and FP - Become a Better Programmer
OOP and FP - Become a Better ProgrammerMario Fusco
 
Reactive Programming for a demanding world: building event-driven and respons...
Reactive Programming for a demanding world: building event-driven and respons...Reactive Programming for a demanding world: building event-driven and respons...
Reactive Programming for a demanding world: building event-driven and respons...Mario Fusco
 
Comparing different concurrency models on the JVM
Comparing different concurrency models on the JVMComparing different concurrency models on the JVM
Comparing different concurrency models on the JVMMario Fusco
 
Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...Mario Fusco
 
If You Think You Can Stay Away from Functional Programming, You Are Wrong
If You Think You Can Stay Away from Functional Programming, You Are WrongIf You Think You Can Stay Away from Functional Programming, You Are Wrong
If You Think You Can Stay Away from Functional Programming, You Are WrongMario Fusco
 
FP in Java - Project Lambda and beyond
FP in Java - Project Lambda and beyondFP in Java - Project Lambda and beyond
FP in Java - Project Lambda and beyondMario Fusco
 
Why we cannot ignore Functional Programming
Why we cannot ignore Functional ProgrammingWhy we cannot ignore Functional Programming
Why we cannot ignore Functional ProgrammingMario Fusco
 
Real world DSL - making technical and business people speaking the same language
Real world DSL - making technical and business people speaking the same languageReal world DSL - making technical and business people speaking the same language
Real world DSL - making technical and business people speaking the same languageMario Fusco
 
Introducing Drools
Introducing DroolsIntroducing Drools
Introducing DroolsMario Fusco
 
Java 7, 8 & 9 - Moving the language forward
Java 7, 8 & 9 - Moving the language forwardJava 7, 8 & 9 - Moving the language forward
Java 7, 8 & 9 - Moving the language forwardMario Fusco
 
Swiss army knife Spring
Swiss army knife SpringSwiss army knife Spring
Swiss army knife SpringMario Fusco
 
No more loops with lambdaj
No more loops with lambdajNo more loops with lambdaj
No more loops with lambdajMario Fusco
 

Mais de Mario Fusco (20)

Let's make a contract: the art of designing a Java API
Let's make a contract: the art of designing a Java APILet's make a contract: the art of designing a Java API
Let's make a contract: the art of designing a Java API
 
OOP and FP
OOP and FPOOP and FP
OOP and FP
 
Lazy java
Lazy javaLazy java
Lazy java
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modeling
 
Drools 6 deep dive
Drools 6 deep diveDrools 6 deep dive
Drools 6 deep dive
 
OOP and FP - Become a Better Programmer
OOP and FP - Become a Better ProgrammerOOP and FP - Become a Better Programmer
OOP and FP - Become a Better Programmer
 
Reactive Programming for a demanding world: building event-driven and respons...
Reactive Programming for a demanding world: building event-driven and respons...Reactive Programming for a demanding world: building event-driven and respons...
Reactive Programming for a demanding world: building event-driven and respons...
 
Comparing different concurrency models on the JVM
Comparing different concurrency models on the JVMComparing different concurrency models on the JVM
Comparing different concurrency models on the JVM
 
Java 8 Workshop
Java 8 WorkshopJava 8 Workshop
Java 8 Workshop
 
Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...
 
Monadic Java
Monadic JavaMonadic Java
Monadic Java
 
If You Think You Can Stay Away from Functional Programming, You Are Wrong
If You Think You Can Stay Away from Functional Programming, You Are WrongIf You Think You Can Stay Away from Functional Programming, You Are Wrong
If You Think You Can Stay Away from Functional Programming, You Are Wrong
 
FP in Java - Project Lambda and beyond
FP in Java - Project Lambda and beyondFP in Java - Project Lambda and beyond
FP in Java - Project Lambda and beyond
 
Why we cannot ignore Functional Programming
Why we cannot ignore Functional ProgrammingWhy we cannot ignore Functional Programming
Why we cannot ignore Functional Programming
 
Real world DSL - making technical and business people speaking the same language
Real world DSL - making technical and business people speaking the same languageReal world DSL - making technical and business people speaking the same language
Real world DSL - making technical and business people speaking the same language
 
Introducing Drools
Introducing DroolsIntroducing Drools
Introducing Drools
 
Java 7, 8 & 9 - Moving the language forward
Java 7, 8 & 9 - Moving the language forwardJava 7, 8 & 9 - Moving the language forward
Java 7, 8 & 9 - Moving the language forward
 
Hammurabi
HammurabiHammurabi
Hammurabi
 
Swiss army knife Spring
Swiss army knife SpringSwiss army knife Spring
Swiss army knife Spring
 
No more loops with lambdaj
No more loops with lambdajNo more loops with lambdaj
No more loops with lambdaj
 

Último

一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样ayvbos
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasDigicorns Technologies
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdfMatthew Sinclair
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsMonica Sydney
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样ayvbos
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtrahman018755
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Roommeghakumariji156
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirtrahman018755
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...gajnagarg
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoilmeghakumariji156
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsMonica Sydney
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...kajalverma014
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理F
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfJOHNBEBONYAP1
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsMonica Sydney
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiMonica Sydney
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsPriya Reddy
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsMonica Sydney
 

Último (20)

一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girls
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 

Kogito: cloud native business automation

  • 2. Mario Fusco Red Hat Principal Sw Engineer Drools project lead Kogito founder Java Champion Edoardo Vacchi Red Hat Senior Sw Engineer Kogito founder
  • 3. Agenda ● Business automation in the cloud: a serverless workflow - demo ● What is business automation: introduction to Drools and jBPM ● Kogito: business automation in the cloud ● Quarkus: an open source stack to write cloud native Java apps ● Decisions as a service: serverless DMN - demo +
  • 4. ● World around us has changed ● Different usage patterns ● New deployment techniques ● Better usage of machine and cluster resources The reasons for a change
  • 5.
  • 6.
  • 7. Application Density CONTAINER ORCHESTRATION Server Server Server Traditional Java Stack NodeJS NodeJS NodeJS NodeJS NodeJS NodeJS Traditional Java Stack Traditional Java Stack Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go
  • 8. Application Density CONTAINER ORCHESTRATION Server Server Server NodeJS NodeJS NodeJS NodeJS NodeJS NodeJS Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Go Native Java Native Java Native Java Native Java Native Java Native Java Native Java Native Java Native Java Native Java Native Java Native Java
  • 9. “I am your density”
  • 10. Traditional vs. Modern Kubernetes OpenShift Jaeger Apache Kafka
  • 13. “building and running applications that do not require server management. It describes a finer-grained deployment model where applications, bundled as one or more functions, are uploaded to a platform and then executed, scaled, and billed in response to the exact demand needed at the moment.” event action result$ CNCF Serverless Whitepaper v1.0
  • 15. Workflows ● Workflow is the procedural movement of information, material, and tasks from one participant to another ● A workflow may be sequential, with each step contingent upon completion of the previous one, or parallel, with multiple steps occurring simultaneously
  • 18.
  • 19. id: ... version: '1.0' name: ... description: ... functions: - ... events: - ... states: - ...
  • 20. Hello World id: helloworld version: '1.0' name: Hello World Workflow description: Inject Hello World states: - name: Hello State type: inject start: kind: default data: result: Hello World! end: kind: default
  • 21. id: greeting version: '1.0' name: Greeting Workflow description: Greet Someone functions: - name: greetingFunction resource: functionResourse states: - name: Greet type: operation start: kind: default actions: - functionRef: refName: greetingFunction parameters: name: "{{ $.person.name }}" actionDataFilter: dataResultsPath: "{{ $.greeting }}" end: kind: default Hello World (2)
  • 22.
  • 23.
  • 25. Serving An event-driven model that serves the container with your application and can "scale to zero".
  • 26. Eventing Common infrastructure for consuming and producing events that will stimulate applications.
  • 28. Cogito, ergo sum Pronunciation /ˈko.d͡ ʒi.to/, [ˈkoː.d͡ ʒi.to] (Don't worry, nobody in the team gets it right, anyway) see also: http://kverlaen.blogspot.com/2019/09/etymology-of-kogito.html René Descartes
  • 29. Kogito, ergo automate ● BTW, this is not Mario ● Not a pirate ● It is a viking ● Odin, who sacrificed his eye for knowledge
  • 30. ● A cloud-native development, deployment and execution platform for business automation: ○ Rules and Decisions ○ Processes and Cases ○ Serverless Workflow ● ... under the covers ○ the backbone is code generation based on business assets ○ executable model for the process/rule/decision definitions ○ type safe data model that encapsulates variables ○ REST api for each public business process/decision/rule Introducing Kogito
  • 32.
  • 33. ● Responsible for building with selected runtime ○ Quarkus ○ Spring Boot ● Provision services on demand and remove them when no longer needed ● Manage deployed services including their dependencies ● Service discovery based on labels ● Guarding services of losing their dependants ● Security provisioning and propagation Operator
  • 34. ● Deploy and manage your services with operator and intuitive CLI tool $ kogito new-app my-app Create new project with default services provisioned $ kogito deploy my-app https://github.com/user/myapp Deploys given application from source and attaches to required infrastructure Operator centric
  • 35.
  • 37. id: yamlgreet version: '1.0' name: Greeting workflow description: YAML based greeting workflow functions: - name: greetFunction type: sysout states: - name: ChooseOnLanguage type: switch start: kind: default dataConditions: - path: "$.language" value: English operator: equals transition: nextState: GreetInEnglish - path: "$.language" value: Spanish operator: equals transition: nextState: GreetInSpanish default: nextState: GreetInEnglish - name: GreetInEnglish type: inject data: greeting: 'Hello from YAML Workflow, ' transition: nextState: GreetPerson - name: GreetInSpanish type: inject data: greeting: 'Saludos desde YAML Workflow, ' transition: nextState: GreetPerson - name: GreetPerson type: operation actions: - name: greetAction functionRef: refName: greetFunction parameters: message: "$.greeting $.name" end: kind: terminate
  • 38. GreetInSpanish GreetInEnglish ChooseOnLanguage GreetPerson { "workflowdata": { "name" : "John", "language": "English" } } language == "Spanish" language == "English" (default)
  • 39. GreetInSpanish GreetInEnglish ChooseOnLanguage GreetPerson language == "Spanish" language == "English" (default) - name: ChooseOnLanguage type: switch start: kind: default dataConditions: - path: "$.language" value: English operator: equals transition: nextState: GreetInEnglish - path: "$.language" value: Spanish operator: equals transition: nextState: GreetInSpanish default: nextState: GreetInEnglish
  • 40. GreetInSpanish GreetInEnglish ChooseOnLanguage GreetPerson language == "Spanish" language == "English" (default) - name: GreetInEnglish type: inject data: greeting: 'Hello from YAML Workflow, ' transition: nextState: GreetPerson - name: GreetInSpanish type: inject data: greeting: 'Saludos desde YAML Workflow, ' transition: nextState: GreetPerson - name: GreetPerson type: operation actions: - name: greetAction functionRef: refName: greetFunction parameters: message: "$.greeting $.name"
  • 42.
  • 44. What is Business Automation ● Processes Set of activities and tasks that, once completed following a specific workflow, will accomplish an organizational goal ● Rules Encapsulate domain and define business-specific constraints and behaviors, keeping them separated from the main application flow
  • 46. What is a Rule ● A business rule is a piece of logic that captures "what to do" depending on a context (Facts) ● Usually captured in natural language first WHEN <CONDITIONS> THEN <ACTIONS>
  • 47. Introducing Drools ● Easier to understand → Requirements can be more naturally translated into rules. It is more likely for a technically skilled business analyst to verify, validate or even change a rule than a piece of Java code ● Improved maintainability → We don't care about how to implement a solution only what needs to be done to solve a problem ● Deals with evolving complexity → It's easier to modify a rule than a Java program and to determine the impact of this change on the rest of the application ● Modularity → Each rule models an isolated and small portion of your business logic and is not part of a monolithic program ● Clear separation of business logic from the rest of the system → Business and infrastructural code have very different life cycles ● Complex Event Processing → Facts can be handled like timestamped events allowing temporal reasoning on them RULES
  • 48. How a Rule Engine Works ● The Rule Base contains a computation efficient representation of the set of the defined rules ● The Working Memory contains the set of facts inserted into session ● The engine matches the fact in the working memory against the rules set ● When a match is found it creates an activation and puts it into the agenda ● An activation is the tuple of facts matching the conditions of a rule plus the rule itself ● When all activations have been created the agenda elects through a conflict resolution strategy the one to be executed first ● The elected activation is passed to the execution engine and then fired
  • 49. A simple rule set rule RaiseAlarm when exists Fire() then insert( new Alarm( "house1" ) ); System.out.println( "Raise the Alarm"); end rule CancelAlarm when not Fire() a : Alarm() then delete( a ); System.out.println( "Cancel the Alarm"); end rule TurnSprinklerOn when s : Sprinkler( on == false ) f : Fire( room == s.room ) then modify( s ) { setOn( true ) } System.out.println( "Turn on the sprinkler for room " + f.getRoom().getName() ); end rule TurnSprinklerOff when s : Sprinkler( on == true ) not Fire( room == s.room ) then modify( s ) { setOn( false ) } System.out.println( "Turn off the sprinkler for room " + s.getRoom().getName() ); end rule OK when not Alarm() not Sprinkler( on == true ) then System.out.println( "Everything is ok" ); end Pattern-matching against objects in the Working Memory Code executed when a match is fired
  • 51. Almost anything in any domain can be expressed as process or rule. It’s a matter of recognizing patterns to be able to avoid repetition and mistakes, and by that automating business.
  • 52. jBPM provides various capabilities that simplify and externalize business logic into reusable assets such as cases, processes, decision tables and more. It consists of: ● business processes (BPMN2) ● case management (BPMN2 and CMMN) ● decision management (DMN) ● business rules (DRL) A toolkit for building business applications to help automate business processes and decisions
  • 53. jBPM … a business process
  • 55. ● Adapts to your business domain instead of the other way around ● No more leaking abstractions of the platform into your client applications ● Stay focused on business requirements instead of implementation technology Focus on business domain instead of technology
  • 57. ● Achieve instant developer efficiency by having ○ Tooling embeddable wherever you need it ○ Code generation taking care of 80% of the work ○ Flexibility to customize, only use what you need ○ Simplified local development with live reload Offers a powerful developer experience
  • 59. ● If you think about business automation think about the cloud as this is where your business logic lives these days ● Achieves amazingly fast boot time and low memory footprint by leveraging newest technology ○ Quarkus ○ Kubernetes/OpenShift/KNative Designed from ground up to run at scale
  • 61. Introducing Quarkus ● A Framework for writing (fast and lightweight) Java applications
  • 62. ● A Framework for writing (fast and lightweight) Java applications ● Code generation reduces startup time and memory footprint (bonus: GraalVM native image) Introducing Quarkus
  • 63. ● A Framework for writing (fast and lightweight) Java applications ● Code generation reduces startup time and memory footprint (bonus: GraalVM native image) ● Exposes existing standard ○ Servlet ○ JAX-RS ○ JPA, JDBC ○ CDI ○ Bean Validation ○ Transactions ○ Logging ○ Microprofile Introducing Quarkus
  • 66. Hot Reload ● ./mvn compile quarkus:dev makes Quarkus run in dev mode and provide hot-reload capabilities ● Changes made to source and configuration files are automatically re-compiled once the browser is refreshed ● Thanks to Kogito’s Quarkus extension, also Drools and jBPM files are recognized as hot reloadable artifacts and the corresponding rules and processes are regenerated
  • 69. Automatic REST endpoint generation & Scaffolding
  • 70. rule LargeDepositApprove when $l: /loanApplications[ applicant.age >= 20, deposit >= 1000, amount <= maxAmount ] then modify($l) { setApproved(true) }; end query FindApproved $l: /loanApplications[ approved ] end
  • 71. rule LargeDepositApprove when $l: /loanApplications[ applicant.age >= 20, deposit >= 1000, amount <= maxAmount ] then modify($l) { setApproved(true) }; end query FindApproved $l: /loanApplications[ approved ] end @Path("/find-approved") public class LoanUnitQueryFindApprovedEndpoint { @javax.inject.Inject() RuleUnit<org.kie.kogito.queries.LoanUnit> ruleUnit; @POST() @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public List<LoanApplication> executeQuery(LoanUnit unitDTO) { RuleUnitInstance<LoanUnit> instance = ruleUnit.createInstance(unitDTO); return instance.executeQuery(LoanUnitQueryFindApproved.class); } } Automatically generate REST endpoint
  • 73. What is DMN? ● DMN (Decision Model and Notation) is a standard for Decision Management from OMG ● Standardizes decision automation from modelling to execution ● A sibling and complementary standard to BPMN (processes) and CMMN (case management) ● A complement to analytics and AI models in general ○ DMN integrates with analytic models and provides explainable white box decisions ● DMN models are stateless only (perfect fit for serverless architectures)
  • 74. DMN introduction: a simple example
  • 75. DMN introduction: a simple example Input Node Decision Node Business Knowledge Model
  • 76. DMN & Hot Reload - Demo Decisions as a Service