jbcnconf: jbpm & vert.x reactive and polyglot bpm

Post on 07-Aug-2015

529 Views

Category:

Software

4 Downloads

Preview:

Click to see full reader

TRANSCRIPT

POLYGLOT & REACTIVE JBPM Maciej Swiderski - Salaboy June ‘15

WHO ARE WE?

Maciej Swiderski

Mauricio Salatino

AGENDA

• jBPM Intro (10 minutes)

• Vert.x in a Nutshell (10 minutes)

• Demo

• Polyglot interactions

• Reactive BPM

WHAT IS JBPM?

Pure Java Lightweight Process Engine.

You can embed it in your apps or infrastructure.

Main Purpose:

• (Micro)Services Orchestration

• Human Workflows support

HOW DOES A PROCESS LOOK LIKE?

KNOWLEDGE IS EVERYTHING (KIE)

• Drools (Rule Engine)

• jBPM (Process Engine)

• Optaplanner (Resource Planning Engine)

• Dashbuilder (Data Analytics & Visualization)

• Uberfire (API to create generic Web IDEs)

CORE ENGINE• Light-weight , Solid, Stable core engine

• Native support for BPMN 2.0

• Automatically/Natively integrated with:

• Rule Engine - Drools Expert

• Complex Event Processing engine - Drools Fusion

• Configurable engine persistence

• Pluggable variable persistence strategies

WORKITEMS• jBPM as a process engine executes steps defined in

the process - commonly known as activities

• jBPM introduces concept of work items - definition of work to be performed

• Work Items are composed of two parts • work item definition - allows to define the work

item once and reuse it across projects - this is the “what”

• work item handler - allows to execute work item on runtime environment - this is the “how”

WHY YOU SHOULD CARE?

• Decouple “what we do” from “how we do it”

• Decoupled lifecycle between your knowledge (process model) and your app infrastructure

• Error Tracking and Auditing for free

RUN YOUR JBPM• As a Service

• Execution Servers (REST, JMS, SOAP)

• Embedded

• low level API (KIE API)

• services API (CDI, Spring, EJB)

• You can use as much as you need

TOOLING

• KIE Workbench (is our Web IDE)

• Authoring (focused on Business Users)

• Runtime (Focused on the day to day work)

• Monitoring (Focused on exposing Real Time Data)

KIE MODULE (KJAR)

• Defines a package with business assets

• Apache Maven is used to: • keep unified and standardized structure of the project• provides dependency management• simplify artifacts distribution and consumption by other projects• get rid of any proprietary formats of knowledge packages

• kjars can have dependencies to any other artifacts including other kjars

• DevOps (Jenkins, Nexus, etc) tools can be used to distribute, host and manager our Kie Modules

• all assets are stored in source control system - GIT

• web tooling provides access to GIT server: • via its UI (allows to work on assets,

create repositories, clone repositories, etc)

• via IDE (allows to clone, pull, push assets) • via any GIT tool (GUI or CLI) for any

operation GIT supports

REPOSITORY

KIE MODULES (DEMO)

GAV: org.jbpm:receive-data:1.0 GAV: org.jbpm:send-data:1.0

DEPLOYMENT OF BUSINESS ASSETS• It depends on the way jBPM is used

• as a service primary deployment unit is kjar which is automatically downloaded from Maven if does not exist locally - identified by GAV (Group, Artifact, Version)

• embedded within the application

• recommended to rely on kjars as well

• allows to add business assets manually (from any source - file system, classpath, database, etc)

VERT.X IN A NUTSHELL

“Vert.x is a lightweight, high performance application platform for the JVM that's designed for modern mobile, web, and enterprise applications.”

VERT.X IN A NUTSHELL• Polyglot

• use your favorite programming language or mix several to develop applications

• Simplicity

• make use of asynchronous APIs without too much hassle

• Scalability

• Scales using message passing to efficiently utilize your server cores.

• Concurrency

• Simple actor-like concurrency model frees you from the pitfalls of traditional multi-threaded programming.

VERT.X IN A NUTSHELL• Verticle

• The packages of code Vert.x executes. Can be written in various languages (JS, Java, Groovy, etc)

• Module

• Modules can contain multiple verticles, potentially written in different languages. Modules allow functionality to be encapsulated and reused

• Vert.x instance

• Verticles run inside a Vert.x instance. A single Vert.x instance runs inside its own JVM instance

VERT.X TOPOLOGY

Vert.x instance

Event bus

Verticle instance

Verticle instance

Verticle instance

VERT.X EVENT BUS• Event bus is the nervous system of Vert.x

• Allow Verticles to communicate with each other regardless what language they were written in

• Clustered - allows to communicate regardless where verticles are located (on the network)

• Simple addressing - simple strings no complex addressing schemes

• Publish/Subscribe and Point to Point messaging

JBPM AND VERT.X• jBPM module for Vert.x

• allows to start instances of Vert.x with jBPM module dedicated to kjar

• Reactive

• Makes use of clustered event bus to communicate between instances of jBPM module

• Polyglot

• Allows to use different languages to interact with running processes

JBPM AND VERT.X• Configurable via json file (receive-data.conf)

{

"containerId" : "org.jbpm:receive-data:1.0",

"managed" : true

}

• Started as zipped module

vertx runzip jbpm-vertx-module-1.0.0-mod.zip -conf receive-data.conf

DEMO OVERVIEW

DEMO: POLYGLOT

• Illustrates how jBPM vert.x module can be used with various languages

• Java Script

• Scala

• Groovy

• Ceylon

DEMO: REACTIVE

• Illustrates how jBPM vert.x module makes use of (clustered) event bus to exchange information between processes

• Use of WorkItems to realize/execute send and receive tasks (BPMN2 activities)

DEMO: BPM TOOLING INTEGRATION

• Illustrates how to integrate with existing jBPM tooling to keep track of what is going on with processing managed by jBPM vert.x module instance

DEMO: BPM TOOLING INTEGRATION

DEMO: SCALABILITY

• Illustrates how easy it is to put up more instances of given kjar to handle increased load

CONTACT US, BE PART OF THE COMMUNITY…

HTTP://MSWIDERSKI.BLOGSPOT.COM

@SALABOY HTTP://SALABOY.COM

ON IRC (24/7) IRC.FREENODE.ORG CHANNELS: #JBPM, #DROOLS

QUESTIONS?

top related