SlideShare a Scribd company logo
Flowable Business Processing
from Kafka Events
Joram Barrez (@jbarrez)
Tijs Rademakers (@tijsrademakers)
07-11-2019@jbarrez @tijsrademakers
© 2019 Flowable AG. All rights reserved.
• Principle Software
Architect at Flowable
• Flowable core dev
• Ex-Co-founder of Activiti
• Ex jBPM developer
• VP of Engineering
at Flowable
• Flowable project lead
• Ex Activiti project lead
• Author of Manning Activiti in
Action and Open Source ESBs
in Action
Short introduction
7 November 2019@jbarrez @tijsrademakers
Joram Barrez Tijs Rademakers
2
© 2019 Flowable AG. All rights reserved.
Agenda & Goals
• Explaining all that Flowable can do in 45 mins is
… impossible
• A taste of what is possible … and focus on our
recent efforts:
• Case management engine (CMMN)
• Recent improved support for using Flowable in
event-driven architectures
• And hope to inspire you to look deeper!
7 November 2019@jbarrez @tijsrademakers 3
© 2019 Flowable AG. All rights reserved.
process instances
per second
1Benchmark details: https://blog.flowable.org
Speed, scalability and innovation
• Fastest engines available1
• Lightweight
Flowable Open Source Project
4
Native BPMN, CMMN and DMN engines
• High performance, high scale
• Years of real world use
Long heritage of Open Source BPM
• Origins since 2010 in Activiti and jBPM
• Established 2016 by Alfresco co-founder and
Activiti team
Community is key
• Credibility through engagement &
contributions
• Usage all over the world
and in all kind
of industries
jBPM
Flowable
Activiti2010
2016
7 November 2019@jbarrez @tijsrademakers
© 2019 Flowable AG. All rights reserved.
OMG (Object Management Group) standards
o BPMN (Business Process Model & Notation) 2.0 - 2011
o CMMN (Case Management Model & Notation) 1.1 - 2016
o DMN (Decision Model & Notation) 1.2 - 2019
Focused on visual representation
XML definition for engine execution
Flowable supports modeling and execution of BPMN, CMMN and
DMN
Open standards
7 November 2019@jbarrez @tijsrademakers 5
© 2019 Flowable AG. All rights reserved.
BPMNCMMN
DMN
6
Open
Standards
© 2019 Flowable AG. All rights reserved.
Model vs. Coding
• The hardest part about our job is translating requirements
• A picture says more than thousands words
• A visual model is the common meeting ground
7 November 2019@jbarrez @tijsrademakers 7
© 2019 Flowable AG. All rights reserved.
Modeling centric
• Visual representation of
business requirements
• Understood by analysts
and devs
• Orchestration logic not
hidden in code
7 November 2019@jbarrez @tijsrademakers 8
© 2019 Flowable AG. All rights reserved.
Runtime state
• Visual representation of
runtime state
• Current activities
• Completed activities
• State data (variables,
identity links, event
subscriptions) always
available
7 November 2019@jbarrez @tijsrademakers 9
© 2019 Flowable AG. All rights reserved.
REST API
BPMN
Engine
CMMN
Engine
DMN Engine Form Engine
Content
Engine
10
Persistence Service
Job Service
Variable Service
Task Service
Identity ServiceEngine specific services
Confidential
Flowable
Modeler
Flowable Task
Flowable Open Source Architecture
Flowable Admin Flowable IDM
© 2019 Flowable AG. All rights reserved.
Rich REST API
• REST API for all
engines (BPMN,
CMMN, DMN etc)
• On par with Java API
• Easy to built UIs against
the REST API
7 November 2019@jbarrez @tijsrademakers 11
© 2019 Flowable AG. All rights reserved.
Flowable Spring
Boot support
• Lots of starter modules
• Auto deployment of
process, case, decision
resources
• Creation and injection of
all engines and services
7 November 2019@jbarrez @tijsrademakers 12
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter</artifactId>
<version>6.4.2</version>
</dependency>
© 2019 Flowable AG. All rights reserved.
BPMN in a Nutshell
7 November 2019@jbarrez @tijsrademakers 13
© 2019 Flowable AG. All rights reserved.
CMMN in a Nutshell
7 November 2019@jbarrez @tijsrademakers 14
Human task
Plan model
Stage
User event listener Exit sentry
Entry sentry
Process task
© 2019 Flowable AG. All rights reserved.
Event-Driven Architectures
• In the Flowable community, we have seen
• People experimenting with event-driven/event-sourcing architectures
(or more often architectures enriched with events)
• Demand for out-of-the-box
7 November 2019@jbarrez @tijsrademakers 15
© 2019 Flowable AG. All rights reserved.
Event-Driven Architectures
• A process/case fits naturally
• Can be the ‘Command’ of an event
(e.g. the C in CQRS)
• Have state to react properly on the change expressed in the event
(state is often the hard part of event-sourcing)
7 November 2019@jbarrez @tijsrademakers 16
© 2019 Flowable AG. All rights reserved.
Quick Demo
7 November 2019@jbarrez @tijsrademakers 17
© 2019 Flowable AG. All rights reserved.
Implementation – The event registry
7 November 2019@jbarrez @tijsrademakers 18
Flowable
Engine
EventRegistry
EventBus
EventDefinitionEventDefinitionEventDefinition
Consumers
Central repository of event metadata
Dispatches events to consumers
(default process/case behaviors are also a consumer)
Description of event structure:
- Payload
- Correlation
© 2019 Flowable AG. All rights reserved.
Implementation – Channels and Pipelines
7 November 2019@jbarrez @tijsrademakers 19
Flowable
Engine
EventRegistry
EventBus
Channel Adapter
Event Consumer
Inbound Channel
Inbound Pipeline
Deserialization
Event key detection
* All shown here on the slide are pluggable
Payload extraction
Event transformatio
n
© 2019 Flowable AG. All rights reserved.
Implementation – Channels and Pipelines
7 November 2019@jbarrez @tijsrademakers 20
Flowable
Engine
EventRegistry
EventBus
Channel Adapter
Event Producer
Outbound Chann
el
Outbound Pipelin
e
Serialization
Event transformatio
n
Demo
https://github.com/flowable/flowable-examples/tree/master/devoxx2019
© 2019 Flowable AG. All rights reserved.
• Fictional electrical kick-scooter
startup
• Customer satisfaction is
priority #1
Use Case
7 November 2019@jbarrez @tijsrademakers 22
© 2019 Flowable AG. All rights reserved.
• Customer can provide a review
• Review  Kafka
• A customer case
• Groups all reviews
• Kicks of a sentiment analysis process
• Analysis is done using a process that
calls out to AWS Comprehend
• Bad review  A task for an employee is
created to try to fix the relationship
Use Case
7 November 2019@jbarrez @tijsrademakers 23
© 2019 Flowable AG. All rights reserved.
Architecture
7 November 2019@jbarrez @tijsrademakers 24
* (5th service (Spring Cloud API gateway) not shown to simplify things)
UI for customers
Review Service
Customer
Relationship
Service
Flowable Task
Sentiment Analysis
service
UI for employees
AWS Comprehend
Review Event
Review Event Analysis
Result
Analysis
Result
Analysis
Request
Analysis
Request
© 2019 Flowable AG. All rights reserved.
Demo: The models explained
7 November 2019@jbarrez @tijsrademakers 25
© 2019 Flowable AG. All rights reserved.
Demo
• Simulating reviews
• Stepping through a bad user review
7 November 2019@jbarrez @tijsrademakers 26
© 2019 Flowable AG. All rights reserved.
Demo: Review Service
• Simple Spring Webflux REST API
• Reactive pushing of events from UI into Kafka
7 November 2019@jbarrez @tijsrademakers 27
© 2019 Flowable AG. All rights reserved.
Demo: Customer Case Service
• Spring Boot application
• Flowable Spring Boot starters
• Autodeploy cases and process models
• Register event channels and definitions
• Postgres DB
7 November 2019@jbarrez @tijsrademakers 28
© 2019 Flowable AG. All rights reserved.
Demo: Customer Case Service
• The sentiment process uses a triggerable service task
• Send-and-wait-for-response pattern
• Race condition problem
7 November 2019@jbarrez @tijsrademakers 29
© 2019 Flowable AG. All rights reserved.
Demo: Customer Case Service
• The sentiment process uses a triggerable service task
7 November 2019@jbarrez @tijsrademakers 30
• During execution (tx1)
• Create event subscription
• Create async job data (to send event)
• Post-commit (tx2)
• Trigger job executor (or other node)
• Send event asynchronously
• Go into wait state
• Event receival (tx3)
• Trigger for continuation
© 2019 Flowable AG. All rights reserved.
Demo: Customer Case Service
• Can this also be made reactive?
• Yes!
• Nicely scaling of message stream handling depending on load
• (insertion of async Flowable job at event receival using R2DBC)
7 November 2019@jbarrez @tijsrademakers 31
© 2019 Flowable AG. All rights reserved.
Demo: The Sentiment Analysis Service
• Spring Boot application
• Flowable Spring Boot starters
• Autodeploy process model
• Uses AWS SDK to call out to AWS Comprehend
7 November 2019@jbarrez @tijsrademakers 32
© 2019 Flowable AG. All rights reserved.
Demo: The Sentiment Analysis Service
• This service is effectively a function
• Can be run serverless
• Only boot up when an event is received
• Only pay for effective usage
• With all the benefits of using Flowable
• Visual models, audit/history, etc.
7 November 2019@jbarrez @tijsrademakers 33
© 2019 Flowable AG. All rights reserved.
Demo: The Sentiment Analysis Service
• This service is effectively a function
• Can e.g. be run as a serverless lambda on AWS, see
https://blog.flowable.org/2019/01/29/flowable-engine-as-a-
serverless-function/
• Flowable + Spring Cloud AWS
• Flowable + Spring Fu + GraalVM
• Flowable + Micronaut + GraalVM (13 ms bootup)
7 November 2019@jbarrez @tijsrademakers 34
© 2019 Flowable AG. All rights reserved.
Demo: Flowable Task
• Bad review  employee form
7 November 2019@jbarrez @tijsrademakers 35
© 2019 Flowable AG. All rights reserved.
Conclusions
• Flowable is a light-weight yet versatile open-source framework for
managing and executing processes/cases/business rules
• We’ve shown that using Flowable in event-driven architectures is
easy and powerful
• Today we’ve focused primarily on the event side of things, but
there’s plenty of more to discover!
• http://www.flowable.org
7 November 2019@jbarrez @tijsrademakers 36
Thank you.
https://flowable.com/flowfest2019/

More Related Content

PDF
What’s New with Flowable?
PDF
Using Kafka: Anatomy of the Flowable event registry
PDF
CMMN makes BPMN smarter and engaging
PPTX
Docker Kubernetes Istio
PDF
AWS における Microservices Architecture と DevOps を推進する組織と人とツール
PDF
AWS 기반 Kubernetes 정복하기::정영준:: AWS Summit Seoul 2018
PPSX
Service Mesh - Observability
PDF
MuleアプリケーションのCI/CD
What’s New with Flowable?
Using Kafka: Anatomy of the Flowable event registry
CMMN makes BPMN smarter and engaging
Docker Kubernetes Istio
AWS における Microservices Architecture と DevOps を推進する組織と人とツール
AWS 기반 Kubernetes 정복하기::정영준:: AWS Summit Seoul 2018
Service Mesh - Observability
MuleアプリケーションのCI/CD

What's hot (20)

PDF
MuleSoft Anypoint Platformのコンセプトとサービス
PDF
Dapr - A 10x Developer Framework for Any Language
PDF
Hexagonal architecture: how, why and when
PDF
Black Belt Online Seminar AWS Amazon S3
PDF
멀티·하이브리드 클라우드 구축 전략 - 네이버비즈니스플랫폼 박기은 CTO
PPTX
Process Orchestration with Flowable and Spring Boot
PDF
Service Mesh with Apache Kafka, Kubernetes, Envoy, Istio and Linkerd
PDF
Design patterns for microservice architecture
PPSX
Elastic-Engineering
PDF
20191023 AWS Black Belt Online Seminar Amazon EMR
PDF
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
PDF
ECS to EKS 마이그레이션 경험기 - 유용환(Superb AI) :: AWS Community Day Online 2021
PPTX
AWS Techical Due Diligence to post transaction execution for M&A
PDF
20190522 AWS Black Belt Online Seminar AWS Step Functions
PPTX
Spring Cloud Gateway on Kubernetes
PDF
AWS Summit Seoul 2023 | Amazon EKS 데이터 전송 비용 절감 및 카오스 엔지니어링 적용 사례
PDF
Microservices architecture
PDF
AWS Transfer Family SFTP and FTPS
PPTX
MSA ( Microservices Architecture ) 발표 자료 다운로드
PPTX
週末趣味のAWS VPC Traffic Mirroring
MuleSoft Anypoint Platformのコンセプトとサービス
Dapr - A 10x Developer Framework for Any Language
Hexagonal architecture: how, why and when
Black Belt Online Seminar AWS Amazon S3
멀티·하이브리드 클라우드 구축 전략 - 네이버비즈니스플랫폼 박기은 CTO
Process Orchestration with Flowable and Spring Boot
Service Mesh with Apache Kafka, Kubernetes, Envoy, Istio and Linkerd
Design patterns for microservice architecture
Elastic-Engineering
20191023 AWS Black Belt Online Seminar Amazon EMR
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
ECS to EKS 마이그레이션 경험기 - 유용환(Superb AI) :: AWS Community Day Online 2021
AWS Techical Due Diligence to post transaction execution for M&A
20190522 AWS Black Belt Online Seminar AWS Step Functions
Spring Cloud Gateway on Kubernetes
AWS Summit Seoul 2023 | Amazon EKS 데이터 전송 비용 절감 및 카오스 엔지니어링 적용 사례
Microservices architecture
AWS Transfer Family SFTP and FTPS
MSA ( Microservices Architecture ) 발표 자료 다운로드
週末趣味のAWS VPC Traffic Mirroring
Ad

Similar to Flowable Business Processing from Kafka Events (20)

PDF
Onboarding process made agile with confluent and flowabl
PDF
Flowable: Building a crowd sourced document extraction and verification system
PDF
Flowable 2019 What's New
PDF
DDD Belgium Meetup 2017: Events, flows and long running services
PDF
MuCon London 2017: Break your event chains
PDF
The Big Picture: Monitoring and Orchestration of Your Microservices Landscape...
PDF
Kafka Summit 2018: Monitoring and Orchestration of Your Microservices Landsca...
PDF
Stateful stream processing made easy with Apache Flink. - A.Mancini F.Tosi - ...
PDF
Stateful stream processing made easy with Apache Flink
PDF
Spring 5 Webflux - Advances in Java 2018
PDF
Complex event flows in distributed systems (QCon London 2019)
PDF
KanDDDinsky: Let your domain events flow
PDF
O'Reilly SA: Complex event flows in distributed systems
PDF
Event-Driven Workflow: Monitoring and Orchestrating Your Microservices Landsc...
PDF
Microservices with Spring 5 Webflux - jProfessionals
PPTX
Flink Forward Berlin 2018: Aljoscha Krettek & Till Rohrmann - Keynote: "A Yea...
PPTX
The Past, Present, and Future of Apache Flink
PDF
Complex Event Flows in Distributed Systems (Bernd Ruecker, Camunda) Kafka Sum...
PDF
Self-Service Data Ingestion Using NiFi, StreamSets & Kafka
PDF
Kafka Summit 2021 - Apache Kafka meets workflow engines
Onboarding process made agile with confluent and flowabl
Flowable: Building a crowd sourced document extraction and verification system
Flowable 2019 What's New
DDD Belgium Meetup 2017: Events, flows and long running services
MuCon London 2017: Break your event chains
The Big Picture: Monitoring and Orchestration of Your Microservices Landscape...
Kafka Summit 2018: Monitoring and Orchestration of Your Microservices Landsca...
Stateful stream processing made easy with Apache Flink. - A.Mancini F.Tosi - ...
Stateful stream processing made easy with Apache Flink
Spring 5 Webflux - Advances in Java 2018
Complex event flows in distributed systems (QCon London 2019)
KanDDDinsky: Let your domain events flow
O'Reilly SA: Complex event flows in distributed systems
Event-Driven Workflow: Monitoring and Orchestrating Your Microservices Landsc...
Microservices with Spring 5 Webflux - jProfessionals
Flink Forward Berlin 2018: Aljoscha Krettek & Till Rohrmann - Keynote: "A Yea...
The Past, Present, and Future of Apache Flink
Complex Event Flows in Distributed Systems (Bernd Ruecker, Camunda) Kafka Sum...
Self-Service Data Ingestion Using NiFi, StreamSets & Kafka
Kafka Summit 2021 - Apache Kafka meets workflow engines
Ad

More from Flowable (14)

PDF
Flowable on Kubenetes
PDF
Creating a checklist engine with Flowable
PDF
How SAP uses Flowable as its BPMN engine for SAP CP Workflow
PDF
FlowFest Welcome
PDF
Low code with Flowable
PDF
Complex batch process migration
PDF
BPMN and CMMN execution error analysis
PPTX
BpmNEXT2019 - The Case of Intentional Process
PDF
Flowable: Life, death and all the other processes in between
PDF
Flowable What´s coming next?
PDF
Advanced process migration with Flowable
PDF
Flowable: High wealth customer engagement through chat-driven case and process
PDF
Deploying Flowable at scale in AWS
PDF
MongoDB and Machine Learning with Flowable
Flowable on Kubenetes
Creating a checklist engine with Flowable
How SAP uses Flowable as its BPMN engine for SAP CP Workflow
FlowFest Welcome
Low code with Flowable
Complex batch process migration
BPMN and CMMN execution error analysis
BpmNEXT2019 - The Case of Intentional Process
Flowable: Life, death and all the other processes in between
Flowable What´s coming next?
Advanced process migration with Flowable
Flowable: High wealth customer engagement through chat-driven case and process
Deploying Flowable at scale in AWS
MongoDB and Machine Learning with Flowable

Recently uploaded (20)

PPTX
worship songs, in any order, compilation
PPTX
2025-08-10 Joseph 02 (shared slides).pptx
PPTX
What is Clause, definition and structure
PPTX
Caption Text about Social Media Post in Internet
PDF
oil_refinery_presentation_v1 sllfmfls.pdf
PDF
Instagram's Product Secrets Unveiled with this PPT
PPTX
Presentation for DGJV QMS (PQP)_12.03.2025.pptx
PPTX
Primary and secondary sources, and history
PDF
Parts of Speech Prepositions Presentation in Colorful Cute Style_20250724_230...
PPTX
Non-Verbal-Communication .mh.pdf_110245_compressed.pptx
PPTX
Understanding-Communication-Berlos-S-M-C-R-Model.pptx
PPTX
Presentation of Project of Enterprenuership topic- "Green Gaurdian"
PPTX
Introduction to Effective Communication.pptx
PPTX
Relationship Management Presentation In Banking.pptx
PPTX
Self management and self evaluation presentation
PPTX
Human Mind & its character Characteristics
PPTX
INTERNATIONAL LABOUR ORAGNISATION PPT ON SOCIAL SCIENCE
PPTX
Emphasizing It's Not The End 08 06 2025.pptx
PPTX
Role and Responsibilities of Bangladesh Coast Guard Base, Mongla Challenges
DOC
学位双硕士UTAS毕业证,墨尔本理工学院毕业证留学硕士毕业证
worship songs, in any order, compilation
2025-08-10 Joseph 02 (shared slides).pptx
What is Clause, definition and structure
Caption Text about Social Media Post in Internet
oil_refinery_presentation_v1 sllfmfls.pdf
Instagram's Product Secrets Unveiled with this PPT
Presentation for DGJV QMS (PQP)_12.03.2025.pptx
Primary and secondary sources, and history
Parts of Speech Prepositions Presentation in Colorful Cute Style_20250724_230...
Non-Verbal-Communication .mh.pdf_110245_compressed.pptx
Understanding-Communication-Berlos-S-M-C-R-Model.pptx
Presentation of Project of Enterprenuership topic- "Green Gaurdian"
Introduction to Effective Communication.pptx
Relationship Management Presentation In Banking.pptx
Self management and self evaluation presentation
Human Mind & its character Characteristics
INTERNATIONAL LABOUR ORAGNISATION PPT ON SOCIAL SCIENCE
Emphasizing It's Not The End 08 06 2025.pptx
Role and Responsibilities of Bangladesh Coast Guard Base, Mongla Challenges
学位双硕士UTAS毕业证,墨尔本理工学院毕业证留学硕士毕业证

Flowable Business Processing from Kafka Events

  • 1. Flowable Business Processing from Kafka Events Joram Barrez (@jbarrez) Tijs Rademakers (@tijsrademakers) 07-11-2019@jbarrez @tijsrademakers
  • 2. © 2019 Flowable AG. All rights reserved. • Principle Software Architect at Flowable • Flowable core dev • Ex-Co-founder of Activiti • Ex jBPM developer • VP of Engineering at Flowable • Flowable project lead • Ex Activiti project lead • Author of Manning Activiti in Action and Open Source ESBs in Action Short introduction 7 November 2019@jbarrez @tijsrademakers Joram Barrez Tijs Rademakers 2
  • 3. © 2019 Flowable AG. All rights reserved. Agenda & Goals • Explaining all that Flowable can do in 45 mins is … impossible • A taste of what is possible … and focus on our recent efforts: • Case management engine (CMMN) • Recent improved support for using Flowable in event-driven architectures • And hope to inspire you to look deeper! 7 November 2019@jbarrez @tijsrademakers 3
  • 4. © 2019 Flowable AG. All rights reserved. process instances per second 1Benchmark details: https://blog.flowable.org Speed, scalability and innovation • Fastest engines available1 • Lightweight Flowable Open Source Project 4 Native BPMN, CMMN and DMN engines • High performance, high scale • Years of real world use Long heritage of Open Source BPM • Origins since 2010 in Activiti and jBPM • Established 2016 by Alfresco co-founder and Activiti team Community is key • Credibility through engagement & contributions • Usage all over the world and in all kind of industries jBPM Flowable Activiti2010 2016 7 November 2019@jbarrez @tijsrademakers
  • 5. © 2019 Flowable AG. All rights reserved. OMG (Object Management Group) standards o BPMN (Business Process Model & Notation) 2.0 - 2011 o CMMN (Case Management Model & Notation) 1.1 - 2016 o DMN (Decision Model & Notation) 1.2 - 2019 Focused on visual representation XML definition for engine execution Flowable supports modeling and execution of BPMN, CMMN and DMN Open standards 7 November 2019@jbarrez @tijsrademakers 5
  • 6. © 2019 Flowable AG. All rights reserved. BPMNCMMN DMN 6 Open Standards
  • 7. © 2019 Flowable AG. All rights reserved. Model vs. Coding • The hardest part about our job is translating requirements • A picture says more than thousands words • A visual model is the common meeting ground 7 November 2019@jbarrez @tijsrademakers 7
  • 8. © 2019 Flowable AG. All rights reserved. Modeling centric • Visual representation of business requirements • Understood by analysts and devs • Orchestration logic not hidden in code 7 November 2019@jbarrez @tijsrademakers 8
  • 9. © 2019 Flowable AG. All rights reserved. Runtime state • Visual representation of runtime state • Current activities • Completed activities • State data (variables, identity links, event subscriptions) always available 7 November 2019@jbarrez @tijsrademakers 9
  • 10. © 2019 Flowable AG. All rights reserved. REST API BPMN Engine CMMN Engine DMN Engine Form Engine Content Engine 10 Persistence Service Job Service Variable Service Task Service Identity ServiceEngine specific services Confidential Flowable Modeler Flowable Task Flowable Open Source Architecture Flowable Admin Flowable IDM
  • 11. © 2019 Flowable AG. All rights reserved. Rich REST API • REST API for all engines (BPMN, CMMN, DMN etc) • On par with Java API • Easy to built UIs against the REST API 7 November 2019@jbarrez @tijsrademakers 11
  • 12. © 2019 Flowable AG. All rights reserved. Flowable Spring Boot support • Lots of starter modules • Auto deployment of process, case, decision resources • Creation and injection of all engines and services 7 November 2019@jbarrez @tijsrademakers 12 <dependency> <groupId>org.flowable</groupId> <artifactId>flowable-spring-boot-starter</artifactId> <version>6.4.2</version> </dependency>
  • 13. © 2019 Flowable AG. All rights reserved. BPMN in a Nutshell 7 November 2019@jbarrez @tijsrademakers 13
  • 14. © 2019 Flowable AG. All rights reserved. CMMN in a Nutshell 7 November 2019@jbarrez @tijsrademakers 14 Human task Plan model Stage User event listener Exit sentry Entry sentry Process task
  • 15. © 2019 Flowable AG. All rights reserved. Event-Driven Architectures • In the Flowable community, we have seen • People experimenting with event-driven/event-sourcing architectures (or more often architectures enriched with events) • Demand for out-of-the-box 7 November 2019@jbarrez @tijsrademakers 15
  • 16. © 2019 Flowable AG. All rights reserved. Event-Driven Architectures • A process/case fits naturally • Can be the ‘Command’ of an event (e.g. the C in CQRS) • Have state to react properly on the change expressed in the event (state is often the hard part of event-sourcing) 7 November 2019@jbarrez @tijsrademakers 16
  • 17. © 2019 Flowable AG. All rights reserved. Quick Demo 7 November 2019@jbarrez @tijsrademakers 17
  • 18. © 2019 Flowable AG. All rights reserved. Implementation – The event registry 7 November 2019@jbarrez @tijsrademakers 18 Flowable Engine EventRegistry EventBus EventDefinitionEventDefinitionEventDefinition Consumers Central repository of event metadata Dispatches events to consumers (default process/case behaviors are also a consumer) Description of event structure: - Payload - Correlation
  • 19. © 2019 Flowable AG. All rights reserved. Implementation – Channels and Pipelines 7 November 2019@jbarrez @tijsrademakers 19 Flowable Engine EventRegistry EventBus Channel Adapter Event Consumer Inbound Channel Inbound Pipeline Deserialization Event key detection * All shown here on the slide are pluggable Payload extraction Event transformatio n
  • 20. © 2019 Flowable AG. All rights reserved. Implementation – Channels and Pipelines 7 November 2019@jbarrez @tijsrademakers 20 Flowable Engine EventRegistry EventBus Channel Adapter Event Producer Outbound Chann el Outbound Pipelin e Serialization Event transformatio n
  • 22. © 2019 Flowable AG. All rights reserved. • Fictional electrical kick-scooter startup • Customer satisfaction is priority #1 Use Case 7 November 2019@jbarrez @tijsrademakers 22
  • 23. © 2019 Flowable AG. All rights reserved. • Customer can provide a review • Review  Kafka • A customer case • Groups all reviews • Kicks of a sentiment analysis process • Analysis is done using a process that calls out to AWS Comprehend • Bad review  A task for an employee is created to try to fix the relationship Use Case 7 November 2019@jbarrez @tijsrademakers 23
  • 24. © 2019 Flowable AG. All rights reserved. Architecture 7 November 2019@jbarrez @tijsrademakers 24 * (5th service (Spring Cloud API gateway) not shown to simplify things) UI for customers Review Service Customer Relationship Service Flowable Task Sentiment Analysis service UI for employees AWS Comprehend Review Event Review Event Analysis Result Analysis Result Analysis Request Analysis Request
  • 25. © 2019 Flowable AG. All rights reserved. Demo: The models explained 7 November 2019@jbarrez @tijsrademakers 25
  • 26. © 2019 Flowable AG. All rights reserved. Demo • Simulating reviews • Stepping through a bad user review 7 November 2019@jbarrez @tijsrademakers 26
  • 27. © 2019 Flowable AG. All rights reserved. Demo: Review Service • Simple Spring Webflux REST API • Reactive pushing of events from UI into Kafka 7 November 2019@jbarrez @tijsrademakers 27
  • 28. © 2019 Flowable AG. All rights reserved. Demo: Customer Case Service • Spring Boot application • Flowable Spring Boot starters • Autodeploy cases and process models • Register event channels and definitions • Postgres DB 7 November 2019@jbarrez @tijsrademakers 28
  • 29. © 2019 Flowable AG. All rights reserved. Demo: Customer Case Service • The sentiment process uses a triggerable service task • Send-and-wait-for-response pattern • Race condition problem 7 November 2019@jbarrez @tijsrademakers 29
  • 30. © 2019 Flowable AG. All rights reserved. Demo: Customer Case Service • The sentiment process uses a triggerable service task 7 November 2019@jbarrez @tijsrademakers 30 • During execution (tx1) • Create event subscription • Create async job data (to send event) • Post-commit (tx2) • Trigger job executor (or other node) • Send event asynchronously • Go into wait state • Event receival (tx3) • Trigger for continuation
  • 31. © 2019 Flowable AG. All rights reserved. Demo: Customer Case Service • Can this also be made reactive? • Yes! • Nicely scaling of message stream handling depending on load • (insertion of async Flowable job at event receival using R2DBC) 7 November 2019@jbarrez @tijsrademakers 31
  • 32. © 2019 Flowable AG. All rights reserved. Demo: The Sentiment Analysis Service • Spring Boot application • Flowable Spring Boot starters • Autodeploy process model • Uses AWS SDK to call out to AWS Comprehend 7 November 2019@jbarrez @tijsrademakers 32
  • 33. © 2019 Flowable AG. All rights reserved. Demo: The Sentiment Analysis Service • This service is effectively a function • Can be run serverless • Only boot up when an event is received • Only pay for effective usage • With all the benefits of using Flowable • Visual models, audit/history, etc. 7 November 2019@jbarrez @tijsrademakers 33
  • 34. © 2019 Flowable AG. All rights reserved. Demo: The Sentiment Analysis Service • This service is effectively a function • Can e.g. be run as a serverless lambda on AWS, see https://blog.flowable.org/2019/01/29/flowable-engine-as-a- serverless-function/ • Flowable + Spring Cloud AWS • Flowable + Spring Fu + GraalVM • Flowable + Micronaut + GraalVM (13 ms bootup) 7 November 2019@jbarrez @tijsrademakers 34
  • 35. © 2019 Flowable AG. All rights reserved. Demo: Flowable Task • Bad review  employee form 7 November 2019@jbarrez @tijsrademakers 35
  • 36. © 2019 Flowable AG. All rights reserved. Conclusions • Flowable is a light-weight yet versatile open-source framework for managing and executing processes/cases/business rules • We’ve shown that using Flowable in event-driven architectures is easy and powerful • Today we’ve focused primarily on the event side of things, but there’s plenty of more to discover! • http://www.flowable.org 7 November 2019@jbarrez @tijsrademakers 36

Editor's Notes

  • #23: Picture from https://pixabay.com/users/mohamed_hassan-5229782/
  • #24: Picture from https://pixabay.com/users/mohamed_hassan-5229782/