Slide 1

Slide 1 text

V0000000 Event-driven Applications with Kogito Serverless Workflows and Knative OpenShift Commons Briefing 2021 Ricardo Zanini Senior Software Engineer

Slide 2

Slide 2 text

V0000000 Agenda Use Case Example Short Demo Event-driven Applications with Kogito Serverless Workflows and Knative CNCF Serverless Workflow Specification Kogito Project

Slide 3

Slide 3 text

V0000000 Event-driven Applications with Kogito Serverless Workflows and Knative CNCF Serverless Workflow Specification

Slide 4

Slide 4 text

V0000000 CNCF Serverless Workflow Specification Serverless Workflow Specification is a CNCF Sandbox Project: https://www.cncf.io/sandbox-projects/ CNCF Serverless Workflow Specification Website "A specification focused on defining a declarative workflow language that targets the serverless computing technology domain."

Slide 5

Slide 5 text

V0000000 Serverless Workflow Specification Source: https://github.com/serverlessworkflow/specification/blob/main/specification.md#Overview Why? Workflows can capture and organize business requirements in a unified manner The specification addresses the need for a vendor-neutral, platform-independent and declarative workflow language Having a common way to define workflows increases the potential for common libraries, tooling and infrastructure Being vendor-neutral, increases portability, productivity and learning curve

Slide 6

Slide 6 text

V0000000 Source: https://github.com/serverlessworkflow/specification/blob/main/specification.md#focus-on-standards Focus on Standards

Slide 7

Slide 7 text

V0000000 Workflow Data Handling Source: https://github.com/serverlessworkflow/specification/blob/main/specification.md#workflow-data

Slide 8

Slide 8 text

V0000000 Workflow Definition Structure Source: https://github.com/serverlessworkflow/specification/blob/main/specification.md#workflow-definition-structure

Slide 9

Slide 9 text

V0000000 Meet Kogito Kogito is a work in progress implementation of the CNCF Serverless Workflow specification

Slide 10

Slide 10 text

V0000000 What’s Kogito? A cloud-native solution to build business applications https://kogito.kie.org/

Slide 11

Slide 11 text

V0000000 Kogito Capabilities Rules: Describe business rules in specific domain-driven DSL Decisions: Design complex decisions with DMN Serverless Orchestration: Execute workflows based on CNCF Serverless Workflow specification Business Process: Design, execute and track business-driven process based on BPMN Cloud native: Tools to model and run business applications for cloud-native architectures

Slide 12

Slide 12 text

V0000000 Supporting Services Cloud-native services to support your business applications VSCode plugins, online and standalone editors Based on battle tested frameworks such as Drools, jBPM and OptaPlanner Editors Engine The Kogito Project Kubernetes Operator and a CLI to deploy and manage Kogito services Cloud Tools

Slide 13

Slide 13 text

V0000000 Example Use Case Online Store Order Processing

Slide 14

Slide 14 text

V0000000 Online Store Order Processing Order Approval Service New Order event

Slide 15

Slide 15 text

V0000000 Online Store Order Processing John Doe, CEO An online store needs to perform Shipping and Fraud verification before proceeding with the Order process

Slide 16

Slide 16 text

V0000000 Online Store Order Processing Order Pre-Processing Workflow Order Approval Service International Shipping Validation Service Domestic Shipping Validation Service Fraud Evaluation Service 1 New Order event 2 After evaluating the order, the workflow can emit up to two events: Fraud evaluation and Shipping Handling 3 When finishing the Shipping Validation, a new event will be emitted, so the order can continue to the approval process 5 This service will correlate all the consumed events to proceed (or not) with the approval process 4 The Fraud Evaluation service emits a new event with the result of the evaluation

Slide 17

Slide 17 text

V0000000 Workflow source files: https://red.ht/kogito-sw-order The Order Pre-Processing Workflow Receive Order Process Order Fraud Handling Shipping Handling Produce Shipping Event Produce Fraud Event Consume New Order Event

Slide 18

Slide 18 text

V0000000 OpenShift Kogito Serverless Workflow Development Model Workflow definition file(s) Kogito Framework Kogito Codegen Kogito Process Engine Internal Image Registry Kogito Operator Kubernetes Resources Knative Resources Image Build Image Pull OpenShift Serverless Platform (Knative) kogito deploy order-sw

Slide 19

Slide 19 text

V0000000 Knative Infrastructure

Slide 20

Slide 20 text

V0000000 Short Demonstration

Slide 21

Slide 21 text

V0000000 Want to know more?

Slide 22

Slide 22 text

V0000000 Resources CNCF Serverless Workflow Specification: https://serverlessworkflow.io/ Kogito: https://kogito.kie.org/ KIE Blog: http://blog.kie.org/ Demonstration source code: https://red.ht/kogito-sw-order KubeCon 2020 US Presentation: https://www.youtube.com/watch?v=noVf6qzyP1U

Slide 23

Slide 23 text

V0000000 linkedin.com/company/red-hat youtube.com/user/RedHatVideos facebook.com/redhatinc twitter.com/RedHat Thank you! :) Linkedin https://www.linkedin.com/in/ricardozanini/ Twitter https://twitter.com/zaninirica