3. Short Disclaimer
The tooling that we will be showing is a
SNAPSHOT/Nightly build version of the project
master branch. It can be built downloading the
community projects hosted in github.
com/droolsjbpm.
If you are using Windows (Internet Explorer), you
can expect some issues that are still being fixed for
the next release.
4. What is jBPM?
● jBPM is a flexible Business Process Engine
● It allows us to define, execute and monitor
Business Processes
● The core is flexible to support any process
definition language, but BPMN2 is the default
one.
● We can embed jBPM in our applications or
● We can use it as a service
6. Advantages of using a Process Engine
● The processes says what to do and not how to do it
(declarative nature). They can be used to discuss with non
technical people how the company works.
● The processes can be used to teach new people about the
companies procedures.
● All the process instances will log their activities and the
process data that can be used to show in real time the
company performance
● Making changes to processes are way faster than changing
all the application code
● The development of the processes and the application
infrastructure can be decoupled
7. What is Drools?
● Drools is a Business Rule Engine
● We can define declaratively how to react to
different scenarios
● The main idea behind using a Rule Engine is to
decouple the business decision and behavior
from the application code
● Rules are composed by:
○ A set of conditions
○ A set of actions
8. Drools Example
○ One Rule Example
Rule “5% discount to silver customers”
when
$c: Customer( type == ‘silver’ )
$p: Purchase( customer == $c )
then
$p.setDiscount(“0.05”);
end
9. Advantages of using a Rule Engine
● The rules says what to do and not how to do it (declarative
nature). They can be used to discuss with non technical
people how the company works.
● The rules can be used to teach new people about the
companies decisions and policies.
● All the rules execution will log their activities data that can
be used to show in real time the company performance
● Making changes to rules are way faster than changing all
the application code
● The development of the rules and the application
infrastructure can be decoupled
10. Drools + jBPM == Platform (KIE)
● Processes gives us a way to formalize and
automate business knowledge
● Rules gives us another way to formalize and
automate business knowledge
● KIE Platform= Knowledge is Everything
○ A platform to formalize, execute and monitor business
knowledge
11. KIE Platform - New Things
● KIE Projects
○
○
○
○
Provides the Drools and jBPM projects structure
Maven based / standard project structure
Integrated with CDI
Defines a Deployment Units for jBPM
● Whole new Tooling!
● Inside the platform you can also find:
○
○
○
○
Drools Fusion for Complex Event Processing
Drools Chance for Fuzzy Logic
Drools Scorecards
+ Community Driven collaborations
12. CDI for KIE Project
● From: https://github.com/droolsjbpm/drools/tree/master/droolsexamples-cdi
13. KIE Project
● Structure (Maven Standard + kmodule.xml)
Standard pom.xml File
Resources / Knowledge Assets
Business Process
KIE Module Descriptor
Forms
17. Tooling Tour
● Home
● Authoring Perspective
○
○
○
○
●
●
●
●
Repository Management
Modelling data
Modelling a process
Modelling forms
Building & Deploying a Project
Starting a Process Instance
Task Management
Business Activity Monitoring
18. Home
● The Knowledge Lifecycle
○
○
○
○
○
Authoring
Runtime Configurations
Process Management
Task Management
Business Activity Monitoring
20. Authoring Perspective - Assets
● Navigate through Organization Units, KIE
Projects…
● Creating new KIE Projects
● Creating Knowledge Assets
21. Data Modeler (Tools > Data Modeler)
● Create Data Objects
● Add properties to Data Objects (Simple types or
other Data Objects)
● Data Objects will be stored as Java files
● Use them as Java Objects on runtime
22. Process Designer (New Item > Business
Process)
●
●
●
●
Based on BPMN 2.0
Context Menu for easy creation of flows
Visual validation
Simulation of business process
23. Form Modeler (New Item > Form)
● Configure Form data sources
○ Data Modeler Objects
○ Java Class in classpath
○ Simple types (String, Long, Integer, Date…)
● Add fields to Form
○ By source
○ WYSIWYG palette
● Configure fields properties (label, required…)
● Configure Form UI
○ Move fields
○ Edit form HTML
27. Process Management
● Process Definitions
○ Shows only Deployed Process Definitions
○ Create new Process Instances
● Process Instances
○ You can inspect the details of your process instance
○ You can look into the Process Variables (simple types
for now)
28. Task Management
● Task Lists
○ Work in your assigned tasks
■ Group Tasks
■ Personal Tasks
● Task Forms
○ FTLs -> Freemarker templates
○ Forms -> Graphically Designed Forms using Form
Modeller
31. kie-wb installation and configuration
Download Wildfly server:
● Wildfly 8.0.0.Beta1 can be downloaded from:
http://wildfly.org/downloads/
● Jboss AS 7.1.1 can still be downloaded from:
http://www.jboss.org/jbossas/downloads/
32. kie-wb installation and configuration
Install Wildfly server:
● Unzip the jboss-as-7.1.1.Final.zip file to a given directory
<installation_dir>.
$ unzip jboss-as-7.1.1.Final.zip
● Start server
cd <installation_dir>/jboss-as-7.1.1.Final/bin
$ ./standalone.sh
note: For Windows systems it's recommended to avoid
directories with blank spaces, or too long directories.
33. kie-wb installation and configuration
Users creation:
● Create the server administrator user using the “add-user.
sh” script.
cd <installation_dir>/jboss-as-7.1.1.Final/bin
$ ./add-user.sh
● Check server installation
http://localhost:9990/console/App.html
note: to create kie-wb application users and roles for
development server, the user.properties and roles .
properties files can be manually edited.
34. kie-wb installation and configuration
Security domain configuration:
● By default kie-wb application is configured to use the “other”
security domain.
● Set this configuration in the standalone-full.xml file.
<security-domain name=" other" cache-type="default">
<authentication>
<login-module code=" UsersRoles" flag="required">
<module-option name="usersProperties"
value="${jboss.server.config.dir}/ bpms-users.properties"/>
<module-option name="rolesProperties"
value="${jboss.server.config.dir}/ bpms-roles.properties"/>
</login-module>
</authentication>
</security-domain>
note: kie-wb application should use the standalone-full.xml
configuration.
35. kie-wb installation and configuration
Enable sso for jbpm-dashbuilder:
● Set this configuration in the standalone-full.xml file.
<subsystem xmlns="urn:jboss:domain:web:1.1"
default-virtual-server="default-host" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http"
socket-binding="http"/>
<virtual-server name="default-host"
enable-welcome-root="true">
<alias name="localhost"/>
<alias name="example.com"/>
<sso/>
</virtual-server>
</subsystem>
40. kie-wb installation and configuration
Database configuration for jbpm-dashbuilder:
https://github.com/droolsjbpm/jbpmdashboard/blob/master/jbpm-dashboarddistributions/src/main/jbossas7/README.md
41. kie-wb installation and configuration
Application deployment:
● Deployment should be done in this order, kie-wb
application first, and then jbpm-dashbuilder application.
● Using Wildfly management console.
http://localhost:9990/console/App.html
● Command line scripts, etc.
$ cd <jboss_home>/bin
$ ./jboss-cli.sh --connect --command="deploy
<path_to_war_file>"
<path_to_war_file>: path to the application war file.
$ ./jboss-cli.sh --connect --command="deploy
/home/wmedvede/development/workshopbcn/distributions/kie-wb-6.1.0-SNAPSHOT-jboss-as7.war"
42. kie-wb installation and configuration
Start and access the application
● Server start
standalone-full.xml
$ ./standalone.sh
-c
$ ./standalone.sh
--server-config=standalone-full.xml
Use the -Dorg.kie.demo=false option to avoid installation of
demo repositories if needed.
$ ./standalone.sh -c
demo=false
standalone-full.xml -Dorg.kie.
● Access the application
http://localhost:8080/kie-wb-6.1.0-SNAPSHOT-jboss-as7
43. kie-wb installation and configuration
Application state directories:
jboss-as-7.1.1.Final/bin
.niogit: local git repositories data.
.index: lucene index data.
.security: keystore for git ssh authentication.
/repositories/kie: application m2 repository.
jboss-as-7.1.1.Final/standalone/data
Deployed sessions ids information
org.jbpm:HR:1.0-jbpmSessionId.ser
test:Tests:1.0-jbpmSessionId.ser
44. Workshop
● Look at the jBPM Playground Git repository
● https://github.com/droolsjbpm/jbpm-playground
45. Human Resources Example
From: https://github.com/droolsjbpm/jbpm-playground
Article: http://salaboy.com/2013/10/11/using-the-jbpm-console-ng-hr-example/
Look for the test project in the jbpm-playground repo
46. Customer Relationships Example
From: https://github.com/droolsjbpm/jbpm-playground
Uses: http://www.service-repository.com/operation/operations?id=30
Article: http://salaboy.com/2013/10/22/kie-wb-jbpm-console-ng-configurations/
Look for the WorkItemHandlers implementation project
Look for the test project in the jbpm-playground repo
47. General Configurations
● User/Groups/Roles
○ Where should I configure it?
○ Look here: http://salaboy.com/2013/10/22/kie-wb-jbpm-console-ngconfigurations/
● Work Item Handlers (Service Connectors)
○ What do I need?
○ Look here: http://salaboy.com/2013/10/22/kie-wb-jbpm-console-ngconfigurations/
● Getting access to the GIT repositories
○ How do I access to the local GIT repository?
○ Let’s do it!
48. REST Endpoints
● For the BPM Side you can interact with the
Process Runtimes using a REST endpoint (https:
//github.com/droolsjbpm/droolsjbpm-integration/wiki)
● You can execute your operations against a KIE
WB running instance
● Project: jbpm-rest-client also from the jbpmplayground repo
49. Community / Further Reading
● IRC: irc.freenode.net
○ #drools
○ #jbpm
● jBPM Forums / Drools Mailing List
○ www.drools.org and www.jbpm.org
○ New web page coming!
● Blogs
○
○
○
○
○
blog.athico.com
kverlaen.blogspot.com
mswiderski.blogspot.com
salaboy.com
pefernan.wordpress.com