SlideShare uma empresa Scribd logo
1 de 106
Baixar para ler offline
Not Quite There Yet
•The SkyNet funding bill is passed.
!
•The system goes online on August 4th, 1997.
!
•Human decisions are removed from strategic defense.
!
•SkyNet begins to learn at a geometric rate.
!
•It becomes self-aware at 2:14am Eastern time, August 29th
!
•In a panic, they try to pull the plug.
!
•And, Skynet fights back
Who am I?
• Drools co-founder
!

• JBoss (2005)
!

• Red Hat (2006)
!

• Polymita Acquisition 2012
!

• Red Hat Platform Architect
KIE - Knowledge Is Everything
KIE

OptaPlanner

Drools

UberFire

jBPM

Guvnor

Drools-WB

jBPM-WB

KIE-WB
KIE - Knowledge Is Everything
KIE - Knowledge Is Everything
GitHub
• URL:
• https://github.com/droolsjbpm/
!

• Bootstrap project:
• https://github.com/droolsjbpm/droolsjbpmbuild-bootstrap
Serious Bits :)
http://www.youtube.com/watch?v=4CvjKqUOEzM

http://www.youtube.com/watch?v=Omj4PR3v-nI

http://www.youtube.com/watch?v=wORlAZoxttA
Technical
Language
CashFlow Rule
select * from Account acc, 	
Cashflow cf, AccountPeriod ap	
where acc.accountNo == cf.accountNo and	
cf.type == CREDIT 	
cf.date >= ap.start and	
cf.date <= ap.end
acc.balance += cf.amount
rule “increase balance for AccountPeriod Credits”
when
ap : AccountPeriod()
acc : Account()
cf : CashFlow( type == CREDIT,
accountNo == acc.accountNo,
date >= ap.start && <= ap.end )
then
acc.balance += cf.amount;
end

9
Graphical Editors
Data Modeller
Decision Table
Decision Table
Guided Editors
Rule Templates
Rule Templates
Decision Table Wizards
Score Cards
• a) Setup Parameters
• b) Characteristic Section
Score Cards
•
•
•
•
•

UI Generates PMML
DRL Generated from PMML
DRL results in
• Calculated Score
• Ranked Reason Codes
Can import PMML 4.1
• but not exposed yet
Calculated Scores
• Currently Summations
• Weight coming
• Not in PMML standard
Scenarios
5.x Critique
5.x Critique
5.x Critique
JCR
• Performance Issues
• Everything stored as
blob
• No tagging, branching
etc.
• Webdav
• Limited team providers
Deployment
• Binary blobs, on url
• Simple Snapshot system
• No real methodology
• Doesn’t align with any
industry standards

Content
• Single tree structure (packages)
• Packages created project
deployment units
• No easy rule use
• Loading “model” jars into
packages

•
•
•
•
•

UI
Not easily extended
Fixed layouts
No perspectives
Hard to change
Too many hacks
Architecture
GIT + Maven

Projects

Projects

Projects

GIT
Repository

GIT
Repository

GIT
Repository

Organization Unit
KIE Installation
Projects

Projects

Projects

Projects
GIT
Repository

GIT
Repository

Organization Unit

Projects

Projects

Reposiotry

GIT
Repository

GIT
Repository

Projects
Reposiotry

Projects

Projects

GIT
Repository

GIT
Repository

Organization Unit
GIT
Repository

Organization Unit
KIE Installation
Application Architecture
Maven
Repository
(local)

mvn install

mvn deploy

Project

Http

Maven
Repository
(remote)

Maven
Repository
(local)

mvn install

Application
Application Installation

KIE Installation
Workbench
Requirements
• Modular design
• Plugins
• Common Life cycles
• Compile time composition of plugins, via maven
• Menus
• contextual to perspective and focus panel
• Visibility Security
• Toolbars
• contextual to perspective and focus panel
• Visibility Security
• Twitter Bootstrap UI
• Flexible layouts
• Perspectives
Requirements
• Security
• Authorization, Authentication
• Seamless API for client and server
• MetaData
• Everything is a file, DB just for fast searching
• GIT Backend
• High Availability
• GIT Cluster
• Apache Helix
• Maven integration for “projects”
High Availability
UberFire Architecture Overview
KIE - Knowledge Is Everything
KIE - Knowledge Is Everything
KIE - Knowledge Is Everything
UF

UberFire
Videos
KIE Workbench Videos
http://www.youtube.com/watch?v=vj3MNmiUnvYindex=2list=PLb9jQNHBKBRj9IJkc_F5nCJAvXaegOGW8
Drools Editor Videos
http://www.youtube.com/playlist?list=PLb9jQNHBKBRipbtadRC-UaUObjwp0aBHJ
Workbench Home Page
Helpful InfoPops
Authoring Perspective
Content Area
Opened assets are added here

Project Explorer
Use the project explorer to
navigate projects for your
organizational’s repository and
create assets to author.

Problems
When you save, validation
errors for the current project are
shown here
Tab Stack
Asset List
The opened assets are shown
here. Click to continue
authoring.

Tab Stack Button
Click the button to see the list of
opened assets
Project Explorer
Organizational Unit
Lists the organizational units.

Repositories
Lists the repositories for the
selected organisational unit.

Projects
Lists the projects for the
selected repository.

Folder Navigation
Click to expand, to see folders.
Project View
Project View
The project view is a simplified
and hides many technical
aspects of the project. Such as
merging multiple paths into one
tree.

Show as Folders
Shows the project folders using
a tree view.

Show as Links
Compact view, that displays the
folders as a single line path.
Repository View
Repository View
The repository view provides
raw access to the project
structure and files, nothing is
hidden. And all paths are visible
separately; see the java and
resources folders.

Show as Folders
Shows the project folders using
a tree view.

Show as Links
Compact view, that displays the
folders as a single line path.
New Projects and Other Items
New Projects
Launches the new project
wizard. Once created it appears
under the project list for the
target repository
Project Editor
Project Dependencies
Build and Deploy
Repository Manager
Repository Manager
GIT Repositories
Repositories
Create or clone GIT repositories
Organizational Units
Manage Organizational Units
Create Organizational Units and
associate repositories with them.
BRMS 5.0 Programmatic API



KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();





kbuilder.batch().add(
.add(
.add(
.add(
.add(
.add(
.add(

newClassPathResource(
newClassPathResource(
newClassPathResource(
newClassPathResource(
newClassPathResource(
newClassPathResource(
newClassPathResource(

Model.drl, getClass() ), DRL )

Queries.drl, getClass() ), DRL )

General.drl, getClass() ), DRL )

Response.drl, getClass() ), DRL )

Events.drl, getClass() ), DRL )

UiView.drl, getClass() ), DRL )

Commands.drl, getClass() ), DRL ).build();


if ( kbuilder.hasErrors() ) {

System.out.println( kbuilder.getErrors().toString() );

System.exit( 1 );

}




KieBaseConfiguration kbaseConf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();

kbaseConf.setOption( EqualityBehaviorOption.EQUALITY );






KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase( kbaseConf );

kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );

Counter c = new Counter();

ksession = kbase.newStatefulKnowledgeSession();
KieModules
•

Discovery
• META-INF/kmodule.xml
• Convention based
• No programmatic api for building
• Multiple Named entities
• Inheritence of Resources
• Defaults for lazy people
• Version built in a standard
Git Hub Examples
• https://github.com/droolsjbpm/drools/tree/master/droolsexamples-api
KieModules
kmodule xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance 

xmlns=http://jboss.org/kie/6.0.0/kmodule



/kmodule

KieServices ks = KieServices.Factory.get();

KieContainer kContainer = ks.getKieClasspathContainer();




KieSession kSession = kContainer.newKieSession();

kSession.setGlobal(out, out);

kSession.insert(new Message(Dave, Hello, HAL. Do you read me, HAL?));

kSession.fireAllRules();
!62
KieModules
• Named Entities and JAR on Classpath
• Creates one KieBase
• Includes resources from package matching
kbase name
kmodule



xmlns=http://jboss.org/kie/6.0.0/kmodule





kbase name=kbase1

ksession name=ksession1/

/kbase

/kmodule

KieServices ks = KieServices.Factory.get();

KieContainer kContainer = ks.getKieClasspathContainer();




KieSession kSession = kContainer.newKieSession(ksession1);

kSession.setGlobal(out, out);

kSession.insert(new Message(Dave, Hello, HAL. Do you read me, HAL?));

kSession.fireAllRules();
!64
KieModules
• Named Entities, with inheritence and JAR on
Classpath
• Two projects, one “includes” from the other
dependency

groupIdorg.drools/groupId

artifactIdnamed-kiesession/artifactId

version6.0.0-SNAPSHOT/version

/dependency

kbase name=kbase2 includes=kbase1

ksession name=ksession2/

/kbase
KieServices ks = KieServices.Factory.get();

KieContainer kContainer = ks.getKieClasspathContainer();

KieSession kSession = kContainer.newKieSession(ksession2);

kSession.setGlobal(out, out);




kSession.insert(new Message(Dave, Hello, HAL. Do you read me, HAL?));

kSession.fireAllRules();




kSession.insert(new Message(Dave, Open the pod bay doors, HAL.));

kSession.fireAllRules();
KieModules
• Package location can over-ride kbase name defaults
kbase name=WumpusMainKB packages=org.drools.games.wumpus.server,
org.drools.games.wumpus.server.view

ksession name=WumpusMainKS /

/kbase




kbase name=WumpusClientKB packages=org.drools.games.wumpus.client

ksession name=WumpusClientKS/

/kbase

KieContainer kc = KieServices.Factory.get().getKieClasspathContainer();

final KieSession serverKsession = kc.newKieSession( WumpusMainKS);

final KieSession clientKsession = kc.newKieSession(WumpusClientKS);
Dynamic KieModules
•
•

JARs can be loaded from URLs into KieRepository
Once loaded they can be resolved via ReleaseId

KieServices ks = KieServices.Factory.get();

KieRepository kr = ks.getRepository();




KieModule kModule = kr.addKieModule(ks.getResources().newFileSystemResource(
getFile(default-kiesession)));




KieContainer kContainer = ks.newKieContainer(kModule.getReleaseId());




KieSession kSession = kContainer.newKieSession();

kSession.setGlobal(out, out);




Object msg1 = createMessage(kContainer,
Dave, Hello, HAL. Do you read me, HAL?);

kSession.insert(msg1);

kSession.fireAllRules();
Dynamic KieModules
• kie-ci use embedded maven for remote
discovery
dependency

groupIdorg.kie/groupId

artifactIdkie-ci/artifactId

/dependency
KieServices ks = KieServices.Factory.get();




// Install example1 in the local maven repo before to do this

KieContainer kContainer = ks.newKieContainer(
ks.newReleaseId(org.drools,
named-kiesession,
6.0.0-SNAPSHOT));




KieSession kSession = kContainer.newKieSession(ksession1);

kSession.setGlobal(out, out);




Object msg1 = createMessage(kContainer,
Dave, Hello, HAL. Do you read me, HAL?);

kSession.insert(msg1);

kSession.fireAllRules();
Dynamic KieModules




// create a new kjar

InternalKieModule kJar2 = createKieJar(ks, releaseId, rule2, rule3);




// deploy it on maven

repository.deployArtifact(releaseId, kJar2, kPom);




// since I am not calling start() on the scanner it means it won't have
automatic scheduled scanning

KieScanner scanner = ks.newKieScanner(kieContainer);




// scan the maven repo to get the new kjar version and deploy it on the
kcontainer

scanner.scanNow();




// create a ksesion and check it works as expected

KieSession ksession2 = kieContainer.newKieSession(KSession1);

checkKSession(ksession2, rule2, rule3);
Maven Versions
•
•
•
•
•
•

version1.0.1/version
version[1.0.0,2.0.0)/version
version[1.0.0,)/version
versionLATEST/version
versionRELEASE/version
versionSNAPSHOT/version
kmodule.xml Editor
Programmatic API
•
•

Builder API, for tooling integration
Incremental compilation, and problem
reporting

KieServices ks = KieServices.Factory.get();

KieRepository kr = ks.getRepository();

KieFileSystem kfs = ks.newKieFileSystem();




kfs.write(src/main/resources/org/kie/example5/HAL5.drl, getRule());




KieBuilder kb = ks.newKieBuilder(kfs);




kb.buildAll(); // kieModule is automatically deployed to KieRepository if
successfully built.

if (kb.getResults().hasMessages(Level.ERROR)) {

throw new RuntimeException(Build Errors:n + kb.getResults().toString());

}




KieContainer kContainer = ks.newKieContainer(kr.getDefaultReleaseId());




KieSession kSession = kContainer.newKieSession();

kSession.setGlobal(out, out);




kSession.insert(new Message(Dave, Hello, HAL. Do you read me, HAL?));

kSession.fireAllRules();
BRMS 6.0
CDI
CDI Context and Dependency
• CDI injects named entities from the
kmodule.xml
!

• Injectable types
• KieServices
• KieContainer
• KieBase
• KieSession
• StatelessKieSession
KBase
@Inject

private KieBase defaultClassPathKBase;




@Inject

@KBase(jar1.KBase1) 

@KReleaseId( groupId
= jar1,

artifactId = art1, 

version
= 1.0)

private KieBase jar1KBase1v10;


@Inject

@KReleaseId( groupId
= jar1,

artifactId = art1, 

version
= 1.0)


private KieBase defaultDynamicKBase;


@Inject 

@KBase(value=jar1.KBase1, name=kb2)
@KReleaseId( groupId
= jar1,

artifactId = art1, 

version
= 1.0)

private KieBase jar1KBase1kb2;





@Inject

@KBase(value=jar1.KBase1, name=kb2)
@KReleaseId( groupId
= jar1,

artifactId = art1, 

version
= 1.0)

private KieBase jar1KBase1kb22;

@Inject

@KBase(jar1.KBase1) 

@KReleaseId(groupId
= jar1,



artifactId = art1, 

version
= 1.1)

private KieBase jar1KBase1v11;




@Inject

@KBase(value=jar1.KBase1, name=kb1)

@KReleaseId( groupId
= jar1,



artifactId = art1, 

version
= 1.0)

private KieBase jar1KBase1kb1;
KSession

@Inject

@KSession(jar1.KSession2) 

@KReleaseId( groupId
= jar1,

artifactId = art1, 

version
= 1.0 )

private KieSession kbase1ksession2v10;


@Inject

@KSession(value=jar1.KSession2, name=ks1)
@KReleaseId( groupId
= jar1,

artifactId = art1, 

version
= 1.0 )

private KieSession kbase1ksession2ks1;


@Inject

@KSession(jar1.KSession2) 

@KReleaseId( groupId
= jar1,

artifactId = art1, 

version
= 1.1 )

private KieSession kbase1ksession2v11;

@Inject

@KSession(value=jar1.KSession2, name=ks2)
@KReleaseId( groupId
= jar1,

artifactId = art1, 

version
= 1.0 )

private KieSession kbase1ksession2ks2 ; 








@Inject

@KSession(value=jar1.KSession2, name=ks2)
@KReleaseId( groupId
= jar1,

artifactId = art1, 

version
= 1.0 )

private KieSession kbase1ksession2ks22;
BRMS 6.0
Spring and Camel
Spring and Camel
kie:kmodule id=CxfRsSpring

kie:kbase name=test1 packages=test1

kie:ksession name=ksession1

kie:batch

kie:set-global identifier=list 

bean class=java.util.ArrayList /

/kie:set-global

/kie:batch

/kie:ksession

kie:ksession name=ksession2/

/kie:kbase

/kie:kmodule
Spring and Camel
bean id=kiePolicy class=org.kie.camel.component.KiePolicy /



camelContext id=camel xmlns=http://camel.apache.org/schema/spring



route

from uri=cxfrs://bean://rsServer/

policy ref=kiePolicy

unmarshal ref=xstream /

to uri=kie:ksession1 /

marshal ref=xstream /

/policy

/route



route id=x1

from uri=direct://http/

policy ref=kiePolicy

to uri=cxfrs://http://localhost:58001/rest/

/policy 

/route 



/camelContext
BRMS 6.0
R.I.P Rete
R.I.P RETE
inspirations:
• Leaps, Collection Oriented Match, L/R Unlinking
!

New Innovations
• Full Rule, and Rule Segment Unlinking
• Lazy Evaluation, with Rule scoping
• Set propagations
!

Previous Innovations
• Modify In Place
• Property Reactive
• Tree Based Graphs
• Subnetwork support
Legacy Systems and Migration
• Legacy API Adapter JAR
• Most API’s should work with legacy adapter
• KnowledegAgents have not been ported,
PKG’s are not longer the unit of deployment
!

•
•
•

JCR Migration Tool
Command Line Java code
Each Package maps to a GIT project
jBPM 6
jBPM6
• The Framework
• The BPM Suite (KIE-Workbench)
• The jBPM Community
The Framework
• Process Engine
• Flexible
• Lightweight
• Embeddable
• Standard Notation (BPMN2)
Processes
jBPM Core
Interactions
New in 6.x
•
•
•
•

CDI integration
Runtime Manager
REST/JMS Endpoints
Project Packaging
Runtime Manager
• Simplifies the configuration of the runtime
services:
• human task service
• knowledge sessions
• persistence  tx layer
• event listeners
Runtime Manager
• Works based on known patterns:
• Singleton
• Per Process Instance
• Per Request
KIE Workbench
• Full suite of tools targeted to:
• Authoring Knowledge Assets (processes,
rules, decision tables, forms, etc)
• Runtime Administration
• End Users
• Task Lists
• Process Management
• Dashboards
Infrastructure
Authoring - Process Designer
Authoring - Form Modeller
Authoring - Form Modeller
End Users - Task Lists
End Users - Task Lists
End Users - Calendar
End Users - Calendar
End Users - Process MGMT
End Users - Dashboards
High Availability
Roadmap
Roadmap
• UI Improvements
• Software governance Workflow
• Asset review, promotion, deployment
• Refactoring and Change Impact
• BRMS HA
Questions?
• Dave Bowman: All right, HAL; I'll go in
through the emergency airlock.
• HAL: Without your space helmet, Dave,
you're going to find that rather difficult.
• Dave Bowman: HAL, I won't argue with
you anymore! Open the doors!
• HAL: Dave, this conversation can serve
no purpose anymore. Goodbye.

Joshya: Greetings, Professor Falken.
Falken: Hello, Joshua.
Joshya: A strange game. The only winning move is not
to play. How about a nice game of chess?

106

Mais conteúdo relacionado

Mais procurados

Understanding PostgreSQL LW Locks
Understanding PostgreSQL LW LocksUnderstanding PostgreSQL LW Locks
Understanding PostgreSQL LW Locks
Jignesh Shah
 

Mais procurados (20)

Devoxx 2012 hibernate envers
Devoxx 2012   hibernate enversDevoxx 2012   hibernate envers
Devoxx 2012 hibernate envers
 
Building a Real-Time Analytics Application with Apache Pulsar and Apache Pinot
Building a Real-Time Analytics Application with  Apache Pulsar and Apache PinotBuilding a Real-Time Analytics Application with  Apache Pulsar and Apache Pinot
Building a Real-Time Analytics Application with Apache Pulsar and Apache Pinot
 
Performance Troubleshooting Using Apache Spark Metrics
Performance Troubleshooting Using Apache Spark MetricsPerformance Troubleshooting Using Apache Spark Metrics
Performance Troubleshooting Using Apache Spark Metrics
 
A Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQLA Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQL
 
Unified Stream and Batch Processing with Apache Flink
Unified Stream and Batch Processing with Apache FlinkUnified Stream and Batch Processing with Apache Flink
Unified Stream and Batch Processing with Apache Flink
 
Performance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and UnderscoresPerformance Stability, Tips and Tricks and Underscores
Performance Stability, Tips and Tricks and Underscores
 
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...
Survey of some free Tools to enhance your SQL Tuning and Performance Diagnost...
 
Google cloud Dataflow & Apache Flink
Google cloud Dataflow & Apache FlinkGoogle cloud Dataflow & Apache Flink
Google cloud Dataflow & Apache Flink
 
Drools Ecosystem
Drools EcosystemDrools Ecosystem
Drools Ecosystem
 
Understanding PostgreSQL LW Locks
Understanding PostgreSQL LW LocksUnderstanding PostgreSQL LW Locks
Understanding PostgreSQL LW Locks
 
MAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19c
 
How to Actually Tune Your Spark Jobs So They Work
How to Actually Tune Your Spark Jobs So They WorkHow to Actually Tune Your Spark Jobs So They Work
How to Actually Tune Your Spark Jobs So They Work
 
Big Data, Data Lake, Fast Data - Dataserialiation-Formats
Big Data, Data Lake, Fast Data - Dataserialiation-FormatsBig Data, Data Lake, Fast Data - Dataserialiation-Formats
Big Data, Data Lake, Fast Data - Dataserialiation-Formats
 
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
 
Introduction to Apache Flink - Fast and reliable big data processing
Introduction to Apache Flink - Fast and reliable big data processingIntroduction to Apache Flink - Fast and reliable big data processing
Introduction to Apache Flink - Fast and reliable big data processing
 
Drools
DroolsDrools
Drools
 
Inside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source DatabaseInside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source Database
 
Introduction To Flink
Introduction To FlinkIntroduction To Flink
Introduction To Flink
 
Using Apache Arrow, Calcite, and Parquet to Build a Relational Cache
Using Apache Arrow, Calcite, and Parquet to Build a Relational CacheUsing Apache Arrow, Calcite, and Parquet to Build a Relational Cache
Using Apache Arrow, Calcite, and Parquet to Build a Relational Cache
 
Adaptive Query Execution: Speeding Up Spark SQL at Runtime
Adaptive Query Execution: Speeding Up Spark SQL at RuntimeAdaptive Query Execution: Speeding Up Spark SQL at Runtime
Adaptive Query Execution: Speeding Up Spark SQL at Runtime
 

Semelhante a Drools and jBPM 6 Overview

Netflix oss season 2 episode 1 - meetup Lightning talks
Netflix oss   season 2 episode 1 - meetup Lightning talksNetflix oss   season 2 episode 1 - meetup Lightning talks
Netflix oss season 2 episode 1 - meetup Lightning talks
Ruslan Meshenberg
 
Cut your hair and get an azure webjob
Cut your hair and get an azure webjobCut your hair and get an azure webjob
Cut your hair and get an azure webjob
Mark Greenway
 

Semelhante a Drools and jBPM 6 Overview (20)

Qcon beijing 2010
Qcon beijing 2010Qcon beijing 2010
Qcon beijing 2010
 
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
 
Netflix oss season 2 episode 1 - meetup Lightning talks
Netflix oss   season 2 episode 1 - meetup Lightning talksNetflix oss   season 2 episode 1 - meetup Lightning talks
Netflix oss season 2 episode 1 - meetup Lightning talks
 
Dev, Staging & Production Workflow with Gitify (at MODXpo 2015 in Munich)
Dev, Staging & Production Workflow with Gitify (at MODXpo 2015 in Munich)Dev, Staging & Production Workflow with Gitify (at MODXpo 2015 in Munich)
Dev, Staging & Production Workflow with Gitify (at MODXpo 2015 in Munich)
 
OSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy HawkinsOSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy Hawkins
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
 
habitat at docker bud
habitat at docker budhabitat at docker bud
habitat at docker bud
 
DevOpsDays Houston 2019 - Shaun Ladewig, Robert Stone - From OverTheWallOps t...
DevOpsDays Houston 2019 - Shaun Ladewig, Robert Stone - From OverTheWallOps t...DevOpsDays Houston 2019 - Shaun Ladewig, Robert Stone - From OverTheWallOps t...
DevOpsDays Houston 2019 - Shaun Ladewig, Robert Stone - From OverTheWallOps t...
 
Creating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJSCreating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJS
 
DrupalCon 2011 Highlight
DrupalCon 2011 HighlightDrupalCon 2011 Highlight
DrupalCon 2011 Highlight
 
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry MeetupIntro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
Intro to Spring Boot and Spring Cloud OSS - Twin Cities Cloud Foundry Meetup
 
Cut your hair and get an azure webjob
Cut your hair and get an azure webjobCut your hair and get an azure webjob
Cut your hair and get an azure webjob
 
Cut your hair and get an azure webjob
Cut your hair and get an azure webjobCut your hair and get an azure webjob
Cut your hair and get an azure webjob
 
Red Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
Red Hat JBoss BRMS and BPMS Workbench and Rich Client TechnologyRed Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
Red Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
 
Automated Visual Regression Testing by Dave Sadlon
Automated Visual Regression Testing by Dave SadlonAutomated Visual Regression Testing by Dave Sadlon
Automated Visual Regression Testing by Dave Sadlon
 
Drupal 8 Deep Dive: Plugin System
Drupal 8 Deep Dive: Plugin SystemDrupal 8 Deep Dive: Plugin System
Drupal 8 Deep Dive: Plugin System
 
Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helix
 
DroidCon UK 2017 recap presentation
DroidCon UK 2017 recap presentationDroidCon UK 2017 recap presentation
DroidCon UK 2017 recap presentation
 
Smart Platform Infrastructure with AWS
Smart Platform Infrastructure with AWSSmart Platform Infrastructure with AWS
Smart Platform Infrastructure with AWS
 

Mais de Mark Proctor

Drools 6.0 (JudCon 2013)
Drools 6.0 (JudCon 2013)Drools 6.0 (JudCon 2013)
Drools 6.0 (JudCon 2013)
Mark Proctor
 

Mais de Mark Proctor (20)

Rule Modularity and Execution Control
Rule Modularity and Execution ControlRule Modularity and Execution Control
Rule Modularity and Execution Control
 
Drools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentation
 
Reducing the Cost of the Linear Growth Effect using Adaptive Rules with Unlin...
Reducing the Cost of the Linear Growth Effect using Adaptive Rules with Unlin...Reducing the Cost of the Linear Growth Effect using Adaptive Rules with Unlin...
Reducing the Cost of the Linear Growth Effect using Adaptive Rules with Unlin...
 
Drools, jBPM and OptaPlanner (NYC and DC Sept 2017 - Keynote Talk Video)
Drools, jBPM and OptaPlanner (NYC and DC Sept 2017 - Keynote Talk Video)Drools, jBPM and OptaPlanner (NYC and DC Sept 2017 - Keynote Talk Video)
Drools, jBPM and OptaPlanner (NYC and DC Sept 2017 - Keynote Talk Video)
 
Learning Rule Based Programming using Games @DecisionCamp 2016
Learning Rule Based Programming using Games @DecisionCamp 2016Learning Rule Based Programming using Games @DecisionCamp 2016
Learning Rule Based Programming using Games @DecisionCamp 2016
 
Drools Happenings 7.0 - Devnation 2016
Drools Happenings 7.0 - Devnation 2016Drools Happenings 7.0 - Devnation 2016
Drools Happenings 7.0 - Devnation 2016
 
RuleML2015 : Hybrid Relational and Graph Reasoning
RuleML2015 : Hybrid Relational and Graph Reasoning RuleML2015 : Hybrid Relational and Graph Reasoning
RuleML2015 : Hybrid Relational and Graph Reasoning
 
Red Hat Summit 2015 : Drools, jBPM and UberFire Roadmaps
Red Hat Summit 2015 : Drools, jBPM and UberFire RoadmapsRed Hat Summit 2015 : Drools, jBPM and UberFire Roadmaps
Red Hat Summit 2015 : Drools, jBPM and UberFire Roadmaps
 
Classic Games Development with Drools
Classic Games Development with DroolsClassic Games Development with Drools
Classic Games Development with Drools
 
Drools and BRMS 6.0 (Dublin Aug 2013)
Drools and BRMS 6.0 (Dublin Aug 2013)Drools and BRMS 6.0 (Dublin Aug 2013)
Drools and BRMS 6.0 (Dublin Aug 2013)
 
UberFire Quick Intro and Overview (early beta Aug 2013)
UberFire Quick Intro and Overview (early beta Aug 2013)UberFire Quick Intro and Overview (early beta Aug 2013)
UberFire Quick Intro and Overview (early beta Aug 2013)
 
What's new in Drools 6 - London JBUG 2013
What's new in Drools 6 - London JBUG 2013What's new in Drools 6 - London JBUG 2013
What's new in Drools 6 - London JBUG 2013
 
Property Reactive RuleML 2013
Property Reactive RuleML 2013Property Reactive RuleML 2013
Property Reactive RuleML 2013
 
Reactive Transitive Closures with Drools (Backward Chaining)
Reactive Transitive Closures with Drools (Backward Chaining)Reactive Transitive Closures with Drools (Backward Chaining)
Reactive Transitive Closures with Drools (Backward Chaining)
 
Drools 6.0 (JudCon 2013)
Drools 6.0 (JudCon 2013)Drools 6.0 (JudCon 2013)
Drools 6.0 (JudCon 2013)
 
Drools 6.0 (CamelOne 2013)
Drools 6.0 (CamelOne 2013)Drools 6.0 (CamelOne 2013)
Drools 6.0 (CamelOne 2013)
 
UberFire Quick Intro and Overview (early beta Jul 2013)
UberFire Quick Intro and Overview (early beta Jul 2013)UberFire Quick Intro and Overview (early beta Jul 2013)
UberFire Quick Intro and Overview (early beta Jul 2013)
 
UberFire (JudCon 2013)
UberFire (JudCon 2013)UberFire (JudCon 2013)
UberFire (JudCon 2013)
 
Drools 6.0 (Red Hat Summit 2013)
Drools 6.0 (Red Hat Summit 2013)Drools 6.0 (Red Hat Summit 2013)
Drools 6.0 (Red Hat Summit 2013)
 
Games development with the Drools rule engine
Games development with the Drools rule engineGames development with the Drools rule engine
Games development with the Drools rule engine
 

Último

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Drools and jBPM 6 Overview

  • 1. Not Quite There Yet •The SkyNet funding bill is passed. ! •The system goes online on August 4th, 1997. ! •Human decisions are removed from strategic defense. ! •SkyNet begins to learn at a geometric rate. ! •It becomes self-aware at 2:14am Eastern time, August 29th ! •In a panic, they try to pull the plug. ! •And, Skynet fights back
  • 2. Who am I? • Drools co-founder ! • JBoss (2005) ! • Red Hat (2006) ! • Polymita Acquisition 2012 ! • Red Hat Platform Architect
  • 3. KIE - Knowledge Is Everything KIE OptaPlanner Drools UberFire jBPM Guvnor Drools-WB jBPM-WB KIE-WB
  • 4. KIE - Knowledge Is Everything
  • 5. KIE - Knowledge Is Everything
  • 6. GitHub • URL: • https://github.com/droolsjbpm/ ! • Bootstrap project: • https://github.com/droolsjbpm/droolsjbpmbuild-bootstrap
  • 9. CashFlow Rule select * from Account acc, Cashflow cf, AccountPeriod ap where acc.accountNo == cf.accountNo and cf.type == CREDIT cf.date >= ap.start and cf.date <= ap.end acc.balance += cf.amount rule “increase balance for AccountPeriod Credits” when ap : AccountPeriod() acc : Account() cf : CashFlow( type == CREDIT, accountNo == acc.accountNo, date >= ap.start && <= ap.end ) then acc.balance += cf.amount; end 9
  • 18. Score Cards • a) Setup Parameters • b) Characteristic Section
  • 19. Score Cards • • • • • UI Generates PMML DRL Generated from PMML DRL results in • Calculated Score • Ranked Reason Codes Can import PMML 4.1 • but not exposed yet Calculated Scores • Currently Summations • Weight coming • Not in PMML standard
  • 23. 5.x Critique JCR • Performance Issues • Everything stored as blob • No tagging, branching etc. • Webdav • Limited team providers Deployment • Binary blobs, on url • Simple Snapshot system • No real methodology • Doesn’t align with any industry standards Content • Single tree structure (packages) • Packages created project deployment units • No easy rule use • Loading “model” jars into packages • • • • • UI Not easily extended Fixed layouts No perspectives Hard to change Too many hacks
  • 27. Application Architecture Maven Repository (local) mvn install mvn deploy Project Http Maven Repository (remote) Maven Repository (local) mvn install Application Application Installation KIE Installation
  • 29. Requirements • Modular design • Plugins • Common Life cycles • Compile time composition of plugins, via maven • Menus • contextual to perspective and focus panel • Visibility Security • Toolbars • contextual to perspective and focus panel • Visibility Security • Twitter Bootstrap UI • Flexible layouts • Perspectives
  • 30. Requirements • Security • Authorization, Authentication • Seamless API for client and server • MetaData • Everything is a file, DB just for fast searching • GIT Backend • High Availability • GIT Cluster • Apache Helix • Maven integration for “projects”
  • 33. KIE - Knowledge Is Everything
  • 34. KIE - Knowledge Is Everything
  • 35. KIE - Knowledge Is Everything
  • 42.
  • 43. Authoring Perspective Content Area Opened assets are added here Project Explorer Use the project explorer to navigate projects for your organizational’s repository and create assets to author. Problems When you save, validation errors for the current project are shown here
  • 44. Tab Stack Asset List The opened assets are shown here. Click to continue authoring. Tab Stack Button Click the button to see the list of opened assets
  • 45. Project Explorer Organizational Unit Lists the organizational units. Repositories Lists the repositories for the selected organisational unit. Projects Lists the projects for the selected repository. Folder Navigation Click to expand, to see folders.
  • 46. Project View Project View The project view is a simplified and hides many technical aspects of the project. Such as merging multiple paths into one tree. Show as Folders Shows the project folders using a tree view. Show as Links Compact view, that displays the folders as a single line path.
  • 47. Repository View Repository View The repository view provides raw access to the project structure and files, nothing is hidden. And all paths are visible separately; see the java and resources folders. Show as Folders Shows the project folders using a tree view. Show as Links Compact view, that displays the folders as a single line path.
  • 48.
  • 49.
  • 50. New Projects and Other Items New Projects Launches the new project wizard. Once created it appears under the project list for the target repository
  • 56. GIT Repositories Repositories Create or clone GIT repositories
  • 57. Organizational Units Manage Organizational Units Create Organizational Units and associate repositories with them.
  • 58. BRMS 5.0 Programmatic API 
 KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
 
 kbuilder.batch().add( .add( .add( .add( .add( .add( .add( newClassPathResource( newClassPathResource( newClassPathResource( newClassPathResource( newClassPathResource( newClassPathResource( newClassPathResource( Model.drl, getClass() ), DRL )
 Queries.drl, getClass() ), DRL )
 General.drl, getClass() ), DRL )
 Response.drl, getClass() ), DRL )
 Events.drl, getClass() ), DRL )
 UiView.drl, getClass() ), DRL )
 Commands.drl, getClass() ), DRL ).build();
 if ( kbuilder.hasErrors() ) {
 System.out.println( kbuilder.getErrors().toString() );
 System.exit( 1 );
 }
 
 KieBaseConfiguration kbaseConf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
 kbaseConf.setOption( EqualityBehaviorOption.EQUALITY );
 
 
 KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase( kbaseConf );
 kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
 Counter c = new Counter();
 ksession = kbase.newStatefulKnowledgeSession();
  • 59. KieModules • Discovery • META-INF/kmodule.xml • Convention based • No programmatic api for building • Multiple Named entities • Inheritence of Resources • Defaults for lazy people • Version built in a standard
  • 60. Git Hub Examples • https://github.com/droolsjbpm/drools/tree/master/droolsexamples-api
  • 61. KieModules kmodule xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance 
 xmlns=http://jboss.org/kie/6.0.0/kmodule
 
 /kmodule KieServices ks = KieServices.Factory.get();
 KieContainer kContainer = ks.getKieClasspathContainer();
 
 KieSession kSession = kContainer.newKieSession();
 kSession.setGlobal(out, out);
 kSession.insert(new Message(Dave, Hello, HAL. Do you read me, HAL?));
 kSession.fireAllRules();
  • 62. !62
  • 63. KieModules • Named Entities and JAR on Classpath • Creates one KieBase • Includes resources from package matching kbase name kmodule 
 xmlns=http://jboss.org/kie/6.0.0/kmodule
 
 kbase name=kbase1
 ksession name=ksession1/
 /kbase
 /kmodule KieServices ks = KieServices.Factory.get();
 KieContainer kContainer = ks.getKieClasspathContainer();
 
 KieSession kSession = kContainer.newKieSession(ksession1);
 kSession.setGlobal(out, out);
 kSession.insert(new Message(Dave, Hello, HAL. Do you read me, HAL?));
 kSession.fireAllRules();
  • 64. !64
  • 65. KieModules • Named Entities, with inheritence and JAR on Classpath • Two projects, one “includes” from the other dependency
 groupIdorg.drools/groupId
 artifactIdnamed-kiesession/artifactId
 version6.0.0-SNAPSHOT/version
 /dependency kbase name=kbase2 includes=kbase1
 ksession name=ksession2/
 /kbase KieServices ks = KieServices.Factory.get();
 KieContainer kContainer = ks.getKieClasspathContainer();
 KieSession kSession = kContainer.newKieSession(ksession2);
 kSession.setGlobal(out, out);
 
 kSession.insert(new Message(Dave, Hello, HAL. Do you read me, HAL?));
 kSession.fireAllRules();
 
 kSession.insert(new Message(Dave, Open the pod bay doors, HAL.));
 kSession.fireAllRules();
  • 66. KieModules • Package location can over-ride kbase name defaults kbase name=WumpusMainKB packages=org.drools.games.wumpus.server, org.drools.games.wumpus.server.view
 ksession name=WumpusMainKS /
 /kbase
 
 kbase name=WumpusClientKB packages=org.drools.games.wumpus.client
 ksession name=WumpusClientKS/
 /kbase KieContainer kc = KieServices.Factory.get().getKieClasspathContainer();
 final KieSession serverKsession = kc.newKieSession( WumpusMainKS);
 final KieSession clientKsession = kc.newKieSession(WumpusClientKS);
  • 67. Dynamic KieModules • • JARs can be loaded from URLs into KieRepository Once loaded they can be resolved via ReleaseId KieServices ks = KieServices.Factory.get();
 KieRepository kr = ks.getRepository();
 
 KieModule kModule = kr.addKieModule(ks.getResources().newFileSystemResource( getFile(default-kiesession)));
 
 KieContainer kContainer = ks.newKieContainer(kModule.getReleaseId());
 
 KieSession kSession = kContainer.newKieSession();
 kSession.setGlobal(out, out);
 
 Object msg1 = createMessage(kContainer, Dave, Hello, HAL. Do you read me, HAL?);
 kSession.insert(msg1);
 kSession.fireAllRules();
  • 68. Dynamic KieModules • kie-ci use embedded maven for remote discovery dependency
 groupIdorg.kie/groupId
 artifactIdkie-ci/artifactId
 /dependency KieServices ks = KieServices.Factory.get();
 
 // Install example1 in the local maven repo before to do this
 KieContainer kContainer = ks.newKieContainer( ks.newReleaseId(org.drools, named-kiesession, 6.0.0-SNAPSHOT));
 
 KieSession kSession = kContainer.newKieSession(ksession1);
 kSession.setGlobal(out, out);
 
 Object msg1 = createMessage(kContainer, Dave, Hello, HAL. Do you read me, HAL?);
 kSession.insert(msg1);
 kSession.fireAllRules();
  • 69. Dynamic KieModules 
 
 // create a new kjar
 InternalKieModule kJar2 = createKieJar(ks, releaseId, rule2, rule3);
 
 // deploy it on maven
 repository.deployArtifact(releaseId, kJar2, kPom);
 
 // since I am not calling start() on the scanner it means it won't have automatic scheduled scanning
 KieScanner scanner = ks.newKieScanner(kieContainer);
 
 // scan the maven repo to get the new kjar version and deploy it on the kcontainer
 scanner.scanNow();
 
 // create a ksesion and check it works as expected
 KieSession ksession2 = kieContainer.newKieSession(KSession1);
 checkKSession(ksession2, rule2, rule3);
  • 72. Programmatic API • • Builder API, for tooling integration Incremental compilation, and problem reporting KieServices ks = KieServices.Factory.get();
 KieRepository kr = ks.getRepository();
 KieFileSystem kfs = ks.newKieFileSystem();
 
 kfs.write(src/main/resources/org/kie/example5/HAL5.drl, getRule());
 
 KieBuilder kb = ks.newKieBuilder(kfs);
 
 kb.buildAll(); // kieModule is automatically deployed to KieRepository if successfully built.
 if (kb.getResults().hasMessages(Level.ERROR)) {
 throw new RuntimeException(Build Errors:n + kb.getResults().toString());
 }
 
 KieContainer kContainer = ks.newKieContainer(kr.getDefaultReleaseId());
 
 KieSession kSession = kContainer.newKieSession();
 kSession.setGlobal(out, out);
 
 kSession.insert(new Message(Dave, Hello, HAL. Do you read me, HAL?));
 kSession.fireAllRules();
  • 74. CDI Context and Dependency • CDI injects named entities from the kmodule.xml ! • Injectable types • KieServices • KieContainer • KieBase • KieSession • StatelessKieSession
  • 75. KBase @Inject
 private KieBase defaultClassPathKBase;
 
 @Inject
 @KBase(jar1.KBase1) 
 @KReleaseId( groupId = jar1,
 artifactId = art1, 
 version = 1.0)
 private KieBase jar1KBase1v10;
 @Inject
 @KReleaseId( groupId = jar1,
 artifactId = art1, 
 version = 1.0) 
 private KieBase defaultDynamicKBase; 
 @Inject 
 @KBase(value=jar1.KBase1, name=kb2) @KReleaseId( groupId = jar1,
 artifactId = art1, 
 version = 1.0)
 private KieBase jar1KBase1kb2; 
 
 @Inject
 @KBase(value=jar1.KBase1, name=kb2) @KReleaseId( groupId = jar1,
 artifactId = art1, 
 version = 1.0)
 private KieBase jar1KBase1kb22; @Inject
 @KBase(jar1.KBase1) 
 @KReleaseId(groupId = jar1,
 
 artifactId = art1, 
 version = 1.1)
 private KieBase jar1KBase1v11; 
 
 @Inject
 @KBase(value=jar1.KBase1, name=kb1)
 @KReleaseId( groupId = jar1,
 
 artifactId = art1, 
 version = 1.0)
 private KieBase jar1KBase1kb1;
  • 76. KSession @Inject
 @KSession(jar1.KSession2) 
 @KReleaseId( groupId = jar1,
 artifactId = art1, 
 version = 1.0 )
 private KieSession kbase1ksession2v10;
 @Inject
 @KSession(value=jar1.KSession2, name=ks1) @KReleaseId( groupId = jar1,
 artifactId = art1, 
 version = 1.0 )
 private KieSession kbase1ksession2ks1;
 @Inject
 @KSession(jar1.KSession2) 
 @KReleaseId( groupId = jar1,
 artifactId = art1, 
 version = 1.1 )
 private KieSession kbase1ksession2v11; @Inject
 @KSession(value=jar1.KSession2, name=ks2) @KReleaseId( groupId = jar1,
 artifactId = art1, 
 version = 1.0 )
 private KieSession kbase1ksession2ks2 ; 
 
 
 @Inject
 @KSession(value=jar1.KSession2, name=ks2) @KReleaseId( groupId = jar1,
 artifactId = art1, 
 version = 1.0 )
 private KieSession kbase1ksession2ks22;
  • 78. Spring and Camel kie:kmodule id=CxfRsSpring
 kie:kbase name=test1 packages=test1
 kie:ksession name=ksession1
 kie:batch
 kie:set-global identifier=list 
 bean class=java.util.ArrayList /
 /kie:set-global
 /kie:batch
 /kie:ksession
 kie:ksession name=ksession2/
 /kie:kbase
 /kie:kmodule
  • 79. Spring and Camel bean id=kiePolicy class=org.kie.camel.component.KiePolicy /
 
 camelContext id=camel xmlns=http://camel.apache.org/schema/spring
 
 route
 from uri=cxfrs://bean://rsServer/
 policy ref=kiePolicy
 unmarshal ref=xstream /
 to uri=kie:ksession1 /
 marshal ref=xstream /
 /policy
 /route
 
 route id=x1
 from uri=direct://http/
 policy ref=kiePolicy
 to uri=cxfrs://http://localhost:58001/rest/
 /policy 
 /route 
 
 /camelContext
  • 81. R.I.P RETE inspirations: • Leaps, Collection Oriented Match, L/R Unlinking ! New Innovations • Full Rule, and Rule Segment Unlinking • Lazy Evaluation, with Rule scoping • Set propagations ! Previous Innovations • Modify In Place • Property Reactive • Tree Based Graphs • Subnetwork support
  • 82. Legacy Systems and Migration • Legacy API Adapter JAR • Most API’s should work with legacy adapter • KnowledegAgents have not been ported, PKG’s are not longer the unit of deployment ! • • • JCR Migration Tool Command Line Java code Each Package maps to a GIT project
  • 84. jBPM6 • The Framework • The BPM Suite (KIE-Workbench) • The jBPM Community
  • 85. The Framework • Process Engine • Flexible • Lightweight • Embeddable • Standard Notation (BPMN2)
  • 89. New in 6.x • • • • CDI integration Runtime Manager REST/JMS Endpoints Project Packaging
  • 90. Runtime Manager • Simplifies the configuration of the runtime services: • human task service • knowledge sessions • persistence tx layer • event listeners
  • 91. Runtime Manager • Works based on known patterns: • Singleton • Per Process Instance • Per Request
  • 92. KIE Workbench • Full suite of tools targeted to: • Authoring Knowledge Assets (processes, rules, decision tables, forms, etc) • Runtime Administration • End Users • Task Lists • Process Management • Dashboards
  • 95. Authoring - Form Modeller
  • 96. Authoring - Form Modeller
  • 97. End Users - Task Lists
  • 98. End Users - Task Lists
  • 99. End Users - Calendar
  • 100. End Users - Calendar
  • 101. End Users - Process MGMT
  • 102. End Users - Dashboards
  • 105. Roadmap • UI Improvements • Software governance Workflow • Asset review, promotion, deployment • Refactoring and Change Impact • BRMS HA
  • 106. Questions? • Dave Bowman: All right, HAL; I'll go in through the emergency airlock. • HAL: Without your space helmet, Dave, you're going to find that rather difficult. • Dave Bowman: HAL, I won't argue with you anymore! Open the doors! • HAL: Dave, this conversation can serve no purpose anymore. Goodbye. Joshya: Greetings, Professor Falken. Falken: Hello, Joshua. Joshya: A strange game. The only winning move is not to play. How about a nice game of chess? 106