drools and jbpm 6 overview
DESCRIPTION
High level introduction to Drools 6, touching on jBPM at the end.TRANSCRIPT
![Page 1: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/1.jpg)
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
![Page 2: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/2.jpg)
Who am I?
• Drools co-founder !
• JBoss (2005) !
• Red Hat (2006) !
• Polymita Acquisition 2012 !
• Red Hat Platform Architect
![Page 3: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/3.jpg)
KIE - Knowledge Is EverythingKIE
Drools jBPMOptaPlanner UberFire
Guvnor
Drools-WB jBPM-WB
KIE-WB
![Page 4: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/4.jpg)
KIE - Knowledge Is Everything
![Page 5: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/5.jpg)
KIE - Knowledge Is Everything
![Page 6: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/6.jpg)
GitHub• URL: • https://github.com/droolsjbpm/ !
• Bootstrap project: • https://github.com/droolsjbpm/droolsjbpm-
build-bootstrap
![Page 7: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/7.jpg)
Serious Bits :)
http://www.youtube.com/watch?v=Omj4PR3v-nI
http://www.youtube.com/watch?v=4CvjKqUOEzM
http://www.youtube.com/watch?v=wORlAZoxttA
![Page 8: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/8.jpg)
Technical Language
![Page 9: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/9.jpg)
select * from Account acc, Cashflow cf, AccountPeriod apwhere acc.accountNo == cf.accountNo and cf.type == CREDIT cf.date >= ap.start and cf.date <= ap.end
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
acc.balance += cf.amount
CashFlow Rule
![Page 10: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/10.jpg)
Graphical Editors
![Page 11: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/11.jpg)
Data Modeller
![Page 12: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/12.jpg)
Decision Table
![Page 13: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/13.jpg)
Decision Table
![Page 14: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/14.jpg)
Guided Editors
![Page 15: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/15.jpg)
Rule Templates
![Page 16: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/16.jpg)
Rule Templates
![Page 17: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/17.jpg)
Decision Table Wizards
![Page 18: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/18.jpg)
Score Cards• a) Setup Parameters • b) Characteristic Section
![Page 19: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/19.jpg)
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
![Page 20: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/20.jpg)
Scenarios
![Page 21: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/21.jpg)
5.x Critique
![Page 22: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/22.jpg)
5.x Critique
![Page 23: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/23.jpg)
5.x CritiqueJCR • Performance Issues • Everything stored as blob
• No tagging, branching etc.
• Webdav • Limited team providers
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
Deployment • Binary blobs, on url • Simple Snapshot system • No real methodology • Doesn’t align with any industry standards
![Page 24: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/24.jpg)
Architecture
![Page 25: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/25.jpg)
GIT + Maven
Organization Unit
GITRepository
GITRepository
Projects Projects Projects
GITRepository
![Page 26: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/26.jpg)
KIE Installation
KIE Installation
Organization Unit
GITRepository Reposiotry
Projects Projects Projects
GITRepository
Organization Unit
GITRepository Reposiotry
Projects Projects Projects
GITRepository
Organization Unit
GITRepository
GITRepository
Projects Projects Projects
GITRepository
![Page 27: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/27.jpg)
Application Architecture
KIE InstallationApplication Installation
Maven Repository
(local)
ApplicationProject
mvn install mvn install
Maven Repository
(local)
Maven Repository (remote)
mvn deployH
ttp
![Page 28: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/28.jpg)
Workbench
![Page 29: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/29.jpg)
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
![Page 30: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/30.jpg)
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”
![Page 31: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/31.jpg)
High Availability
![Page 32: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/32.jpg)
UberFire Architecture Overview
![Page 33: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/33.jpg)
KIE - Knowledge Is Everything
![Page 34: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/34.jpg)
KIE - Knowledge Is Everything
![Page 35: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/35.jpg)
KIE - Knowledge Is Everything
![Page 36: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/36.jpg)
UF UberFire
![Page 37: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/37.jpg)
Videos
![Page 38: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/38.jpg)
KIE Workbench Videoshttp://www.youtube.com/watch?v=vj3MNmiUnvY&index=2&list=PLb9jQNHBKBRj9IJkc_F5nCJAvXaegOGW8
![Page 39: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/39.jpg)
Drools Editor Videoshttp://www.youtube.com/playlist?list=PLb9jQNHBKBRipbtadRC-UaUObjwp0aBHJ
![Page 40: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/40.jpg)
Workbench Home Page
![Page 41: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/41.jpg)
Helpful InfoPops
![Page 42: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/42.jpg)
![Page 43: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/43.jpg)
Authoring Perspective
Project ExplorerUse the project explorer to navigate projects for your organizational’s repository and create assets to author.
ProblemsWhen you save, validation errors for the current project are shown here
Content AreaOpened assets are added here
![Page 44: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/44.jpg)
Tab Stack
Tab Stack ButtonClick the button to see the list of opened assets
Asset ListThe opened assets are shown here. Click to continue authoring.
![Page 45: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/45.jpg)
Project Explorer
Organizational UnitLists the organizational units.
RepositoriesLists the repositories for the selected organisational unit.
ProjectsLists the projects for the selected repository.
Folder NavigationClick to expand, to see folders.
![Page 46: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/46.jpg)
Project View
Show as Folders
Show as LinksCompact view, that displays the folders as a single line path.
Project ViewThe project view is a simplified and hides many technical aspects of the project. Such as merging multiple paths into one tree.
Shows the project folders using a tree view.
![Page 47: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/47.jpg)
Repository ViewRepository ViewThe 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
Show as LinksCompact view, that displays the folders as a single line path.
Shows the project folders using a tree view.
![Page 48: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/48.jpg)
![Page 49: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/49.jpg)
![Page 50: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/50.jpg)
New Projects and Other Items
New Projects
Launches the new project wizard. Once created it appears under the project list for the target repository
![Page 51: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/51.jpg)
Project Editor
![Page 52: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/52.jpg)
Project Dependencies
![Page 53: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/53.jpg)
Build and Deploy
![Page 54: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/54.jpg)
Repository Manager
![Page 55: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/55.jpg)
Repository Manager
![Page 56: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/56.jpg)
GIT RepositoriesRepositoriesCreate or clone GIT repositories
![Page 57: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/57.jpg)
Organizational UnitsManage Organizational UnitsCreate Organizational Units and associate repositories with them.
![Page 58: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/58.jpg)
BRMS 5.0 Programmatic APIKnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();kbuilder.batch().add( newClassPathResource( "Model.drl", getClass() ), DRL ) .add( newClassPathResource( "Queries.drl", getClass() ), DRL ) .add( newClassPathResource( "General.drl", getClass() ), DRL ) .add( newClassPathResource( "Response.drl", getClass() ), DRL ) .add( newClassPathResource( "Events.drl", getClass() ), DRL ) .add( newClassPathResource( "UiView.drl", getClass() ), DRL ) .add( newClassPathResource( "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();
![Page 59: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/59.jpg)
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
![Page 60: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/60.jpg)
Git Hub Examples• https://github.com/droolsjbpm/drools/tree/master/drools-
examples-api
![Page 61: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/61.jpg)
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();
![Page 62: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/62.jpg)
!62
![Page 63: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/63.jpg)
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();
![Page 64: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/64.jpg)
!64
![Page 65: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/65.jpg)
KieModules• Named Entities, with inheritence and JAR on
Classpath • Two projects, one “includes” from the other<dependency> <groupId>org.drools</groupId> <artifactId>named-kiesession</artifactId> <version>6.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();
![Page 66: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/66.jpg)
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");
![Page 67: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/67.jpg)
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();
![Page 68: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/68.jpg)
Dynamic KieModules• kie-ci use embedded maven for remote
discovery<dependency> <groupId>org.kie</groupId> <artifactId>kie-ci</artifactId> </dependency>
KieServices ks = KieServices.Factory.get();// Install example1 in the local maven repo before to do thisKieContainer 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();
![Page 69: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/69.jpg)
Dynamic KieModules// create a new kjarInternalKieModule kJar2 = createKieJar(ks, releaseId, "rule2", "rule3"); // deploy it on mavenrepository.deployArtifact(releaseId, kJar2, kPom);// since I am not calling start() on the scanner it means it won't have automatic scheduled scanningKieScanner scanner = ks.newKieScanner(kieContainer);// scan the maven repo to get the new kjar version and deploy it on the kcontainerscanner.scanNow();// create a ksesion and check it works as expectedKieSession ksession2 = kieContainer.newKieSession("KSession1");checkKSession(ksession2, "rule2", "rule3");
![Page 70: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/70.jpg)
Maven Versions• <version>1.0.1</version> • <version>[1.0.0,2.0.0)</version> • <version>[1.0.0,)</version> • <version>LATEST</version> • <version>RELEASE</version> • <version>SNAPSHOT</version>
![Page 71: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/71.jpg)
kmodule.xml Editor
![Page 72: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/72.jpg)
Programmatic API• Builder API, for tooling integration • Incremental compilation, and problem
reportingKieServices 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();
![Page 73: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/73.jpg)
BRMS 6.0 CDI
![Page 74: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/74.jpg)
CDI Context and Dependency • CDI injects named entities from the
kmodule.xml !
• Injectable types • KieServices • KieContainer • KieBase • KieSession • StatelessKieSession
![Page 75: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/75.jpg)
KBase
@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;
@Injectprivate KieBase defaultClassPathKBase; @Inject@KReleaseId( groupId = "jar1", artifactId = "art1", version = "1.0") private KieBase defaultDynamicKBase;
@Inject@KBase("jar1.KBase1") @KReleaseId( groupId = "jar1", artifactId = "art1", version = "1.0") private KieBase jar1KBase1v10; @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;
![Page 76: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/76.jpg)
KSession@Inject@KSession("jar1.KSession2") @KReleaseId( groupId = "jar1", artifactId = "art1", version = "1.0" ) private KieSession kbase1ksession2v10; @Inject@KSession("jar1.KSession2") @KReleaseId( groupId = "jar1", artifactId = "art1", version = "1.1" ) private KieSession kbase1ksession2v11;
@Inject@KSession(value="jar1.KSession2", name="ks1") @KReleaseId( groupId = "jar1", artifactId = "art1", version = "1.0" ) private KieSession kbase1ksession2ks1; @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;
![Page 77: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/77.jpg)
BRMS 6.0 Spring and Camel
![Page 78: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/78.jpg)
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>
![Page 79: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/79.jpg)
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>
![Page 80: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/80.jpg)
BRMS 6.0 R.I.P Rete
![Page 81: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/81.jpg)
R.I.P RETEinspirations: • 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
![Page 82: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/82.jpg)
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
![Page 83: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/83.jpg)
jBPM 6
![Page 84: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/84.jpg)
jBPM6• The Framework • The BPM Suite (KIE-Workbench) • The jBPM Community
![Page 85: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/85.jpg)
The Framework• Process Engine
• Flexible • Lightweight • Embeddable • Standard Notation (BPMN2)
![Page 86: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/86.jpg)
Processes
![Page 87: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/87.jpg)
jBPM Core
![Page 88: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/88.jpg)
Interactions
![Page 89: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/89.jpg)
New in 6.x• CDI integration • Runtime Manager • REST/JMS Endpoints • Project Packaging
![Page 90: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/90.jpg)
Runtime Manager• Simplifies the configuration of the runtime
services: • human task service • knowledge sessions • persistence & tx layer • event listeners
![Page 91: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/91.jpg)
Runtime Manager• Works based on known patterns:
• Singleton • Per Process Instance • Per Request
![Page 92: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/92.jpg)
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
![Page 93: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/93.jpg)
Infrastructure
![Page 94: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/94.jpg)
Authoring - Process Designer
![Page 95: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/95.jpg)
Authoring - Form Modeller
![Page 96: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/96.jpg)
Authoring - Form Modeller
![Page 97: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/97.jpg)
End Users - Task Lists
![Page 98: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/98.jpg)
End Users - Task Lists
![Page 99: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/99.jpg)
End Users - Calendar
![Page 100: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/100.jpg)
End Users - Calendar
![Page 101: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/101.jpg)
End Users - Process MGMT
![Page 102: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/102.jpg)
End Users - Dashboards
![Page 103: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/103.jpg)
High Availability
![Page 104: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/104.jpg)
Roadmap
![Page 105: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/105.jpg)
Roadmap• UI Improvements • Software governance Workflow
• Asset review, promotion, deployment • Refactoring and Change Impact • BRMS HA
![Page 106: Drools and jBPM 6 Overview](https://reader031.vdocuments.net/reader031/viewer/2022020105/54834224b47959050d8b49f0/html5/thumbnails/106.jpg)
���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?