quangtin3 [
https://community.jboss.org/people/quangtin3] modified the document:
"jBPM-5.3.0.Final Manual Deployment Guide for Beginner"
To view the document, visit:
https://community.jboss.org/docs/DOC-21179
--------------------------------------------------------------
**
#1_Overview_of_jBPM 1. Overview of jBPM
***
#jBPM_Components jBPM Components
***
#Separation_deployment Separation deployment
**
#2_Common_bugs_fix_after_jBPM530Final_release 2. Common bugs fix after jBPM-5.3.0.Final
release
***
#Building_from_sourcecode Building from source-code
****
#a_Configure_your_git_username_and_email a. Configure your git username and email
****
#b_Clone_jbpm_repository_from_githubcom b. Clone jbpm repository from
github.com
****
#c_Working_with_local_repository c. Working with local repository
*****
#List_all_jBPM_tags_ List all jBPM tags
*****
#Switch_to_530Final_revision_tag Switch to 5.3.0.Final revision tag.
*****
#View_prehistory_just_before_jBPM_team_released_jBPM530Final View pre-history just before
jBPM team released jBPM.5.3.0.Final
***
#Apply_bug_fix Apply bug fix
****
#Bug_Could_not_locate_named_parameter_userId Bug: Could not locate named parameter
[userId]
****
#Bug_No_result_or_connection_timeout Bug: No result, or connection timeout
****
#Bug_Must_be_positive Bug: Must be positive
****
#Bug_HornetQ_binding_only_to_local_address Bug: HornetQ binding only to local address.
**
#3_Manual_jBPM_components_deployment 3. Manual jBPM components deployment
***
#Environment Environment
****
#Check_your_JDK_installation Check your JDK installation
****
#Check_apache_maven Check apache maven
****
#Check_apache_ant Check apache ant
***
#Deployment_parameters Deployment parameters
***
#MySQL_database_deployment_just_verify MySQL database deployment (just verify).
**
#4_Drools_guvnor_designer_and_formbuilder_deployment_with_verify 4. Drools guvnor,
designer, and form-builder deployment (with verify)
***
#Step_41Extract_a_clean_copy_of_jbossas702Finalzip_to_GUVNOR_JBOSS Step 4.1:Extract a
clean copy of jboss-as-7.0.2.Final.zip to GUVNOR_JBOSS
***
#Step_42_Jboss_configuration Step 4.2: Jboss configuration.
***
#Step_43_droolsguvnor_configuration Step 4.3: drools-guvnor configuration
****
#a_Update_GUVNOR_JBOSSpreferencesproperties_to_our_will_be_deployed_designer_and_formbuilder
a. Update GUVNOR_JBOSS/preferences.properties to our will be deployed designer and
form-builder
****
#b_Place_a_copy_of_GUVNOR_JBOSSpreferencesproperties_to_droolsguvnorwarWEBINFclassespreferencesproperties
b. Place a copy of GUVNOR_JBOSS/preferences.properties to
drools-guvnor.war/WEB-INF/classes/preferences.properties
***
#Step_44_Deploy_and_verify_droolsguvnor_component_installation Step 4.4: Deploy and
verify drools-guvnor component installation
****
#a_Deploy_droolsguvnor a. Deploy drools-guvnor
****
#b_Verify_that_we_have_the_following_message_in_the_console b. Verify that we have the
following message in the console
****
#c_Verify_that_we_can_access_the_droolsguvnor c. Verify that we can access the
drools-guvnor
***
#Step_45_Deploy_designer Step 4.5: Deploy designer
****
#a_Apply_the_change_for_Designer_as_following_article_httpbpmgeekcomblogmakingjbpm5workremotehost_
a. Apply the change for Designer as following article
http://bpmgeek.com/blog/making-jbpm5-work-remote-host
****
#b_Deploy_designer b. Deploy designer
****
#c_Verify_designer c. Verify designer
***
#Step_46_Deploy_formbuilder Step 4.6: Deploy form-builder
****
#a_Add_usersroles_configuration_to_GUVNOR_JBOSS a. Add users/roles configuration to
GUVNOR_JBOSS
****
#b_Add_security_domain_for_jbpmformbuilder_in_file_standaloneconfigurationstandalonexml
b. Add security domain for jbpm-form-builder in file
standalone/configuration/standalone.xml
****
#c_Add_usersroles_to_jbpmformbuilderwarWEBINFclasses c. Add users/roles to
jbpm-form-builder.war/WEB-INF/classes/
****
#d_Deploy_formbuilder_and_verify_like_we_already_did_with_designer d. Deploy form-builder
and verify like we already did with designer
****
#e_Verify_that_you_have e. Verify that you have
**
#5_TaskService_or_Human_Task_deployment_with_verify 5. Task-Service or Human Task
deployment (with verify).
***
#Step_51Extract_a_clean_copy_of_jbossas702Finalzip_to_HUMAN_TASK_JBOSS Step 5.1:Extract a
clean copy of jboss-as-7.0.2.Final.zip to HUMAN_TASK_JBOSS
***
#Step_52_Copy_your_custom_build_humantask_ Step 5.2: Copy your custom build human-task
***
#Step_53_Jboss_standalonexml_configuration_ Step 5.3: Jboss standalone.xml configuration
****
#a_Remove_pojo_and_jpa_modules a. Remove pojo and jpa modules
*****
#Pojo_extension Pojo extension
*****
#And_pojo_domain And pojo domain
*****
#Jpa_extention Jpa extention
*****
#_And_jpa_domain And jpa domain
****
#b_Change_port_for_management_interface_HUMAN_TASK_MANAGEMENT_PORTs b. Change port for
management interface (HUMAN_TASK_MANAGEMENT_PORTs)
****
#c_Add_datasource_for_taskservice c. Add datasource for task-service
****
#d_Bind_to_HUMAN_TASK_IP d. Bind to HUMAN_TASK_IP
****
#e_Set_offsetport e. Set offset-port
***
#Step_54_MySQL_driver_for_jboss Step 5.4: MySQL driver for jboss
****
#a_Create_MySQL_module_directory a. Create MySQL module directory
****
#bCopy_module_declaration_file b.Copy module declaration file
****
#c_Download_and_install_mysql_driver_to_jBoss c. Download and install mysql driver to
jBoss
****
#d_Start_your_HUMAN_TASK_JBOSS_now d. Start your HUMAN_TASK_JBOSS now
***
#Step_55_jbpmhumantaskwarwar_configuration Step 5.5: jbpm-human-task-war.war
configuration
****
#a_In_your_jbpmhumantaskwarwar_file_make_following_modification_with_your_current_archive_manager
a. In your jbpm-human-task-war.war file, make following modification with your current
archive manager
****
#b_Configure_your_WEBINFwebxml_as_following b. Configure your WEB-INF/web.xml as
following
*****
#Make_HornetQ_as_active_transport Make HornetQ as active transport
*****
#Set_HornetQ_binding_address_and_port_Remember_our_fix_at_the_end_of_part_2_to_HUMAN_TASK_IP_and_HORNETQ_PORT
Set HornetQ binding address and port (Remember our fix at the end of part 2) to
HUMAN_TASK_IP and HORNETQ_PORT
*****
#Optional_Task_service_persistence_unit_name_we_will_use_default_value_so_you_can_keep_it_blank
Optional: Task service persistence unit name, we will use default value so you can keep it
blank
*****
#User_demo_usergroup_callback_implementation User demo user/group call-back
implementation
*****
#Using_demo_user_and_group_provider Using demo user and group provider
****
#c_Configure_persistencexml_ c. Configure persistence.xml
*****
#Change_jbpmDS_to_taskDS Change jbpmDS to taskDS
*****
#Modify_properties_to_your_MySQL_IP_and_MySQL_PORT Modify properties to your MySQL_IP and
MySQL_PORT
****
#d_Update_jpbmhumantaskwarwarWEBINFclassesMETAINFpersistencexml d. Update
jpbm-human-task-war.war/WEB-INF/classes/META-INF/persistence.xml
****
#e_Deploy_formbuilder_and_verify_like_we_already_did_with_designer e. Deploy form-builder
and verify like we already did with designer
****
#e_Verify_HumanTask e. Verify Human-Task
*****
#Verify_that_you_have_message_like_this Verify that you have message like this
*****
#And_your_check_if_you_can_telnet_to_HUMAN_TASK_IPHORNETQ_PORT_from_CONSOLE_IP And your
check if you can telnet to HUMAN_TASK_IP:HORNETQ_PORT from CONSOLE_IP
**
#6_jBPMConsole_deployment_with_verify 6. jBPM-Console deployment (with verify).
***
#Step_61Extract_a_clean_copy_of_jbossas702Finalzip_to_CONSOLE_JBOSS Step 6.1:Extract a
clean copy of jboss-as-7.0.2.Final.zip to CONSOLE_JBOSS
***
#Step_62_Add_usersroles_configuration_to_CONSOLE_JBOSS Step 6.2 Add users/roles
configuration to CONSOLE_JBOSS
***
#Step_63_Copy_your_custom_build_jbpmconsole Step 6.3: Copy your custom build
jbpm-console
***
#Step_64_Jboss_standalonexml_configuration Step 6.4: Jboss standalone.xml configuration
****
#a_Remove_pojo_and_jpa_modules_933043 a. Remove pojo and jpa modules
*****
#Pojo_extension_299010 Pojo extension
*****
#And_pojo_domain_261011 And pojo domain
*****
#Jpa_extention_854502 Jpa extention
*****
#And_jpa_domain And jpa domain
****
#b_Change_port_for_management_interface_CONSOLE_MANAGEMENT_PORT b. Change port for
management interface (CONSOLE_MANAGEMENT_PORT)
****
#c_Add_datasource c. Add datasource
****
#d_Add_security_domain_for_jbpmconsole d. Add security domain for jbpm-console
****
#e_Bind_to_CONSOLE_IP_For_example e. Bind to CONSOLE_IP. For example
****
#f_Set_offsetport f. Set offset-port
***
#Step_65_MySQL_driver_for_jboss_identical_with_Step_54 Step 6.5: MySQL driver for jboss
(identical with Step 5.4)
****
#a_Create_MySQL_module_directory_534607 a. Create MySQL module directory
****
#bCopy_module_declaration_file_563482 b.Copy module declaration file
****
#c_Download_and_install_mysql_driver_to_jBoss_811673 c. Download and install mysql driver
to jBoss
****
#d_Start_your_CONSOLE_JBOSS_now d. Start your CONSOLE_JBOSS now
***
#Step_66_Gwtconsoleserverwar_configuration Step 6.6: Gwt-console-server.war
configuration
****
#a_Add_usersroles_to_gwtconsoleserverwarWEBINFclasses a. Add users/roles to
gwt-console-server.war/WEB-INF/classes/
****
#b_Configure_persistencexml b. Configure persistence.xml
*****
#Add_mapping_for_ProcessInstanceInfohbmxml Add mapping for ProcessInstanceInfo.hbm.xml
*****
#Change_to_MySQL_database Change to MySQL database
*****
#Mark_Hibernate_to_show_sql Mark Hibernate to show_sql
*****
#Your_persistencexml_will_look_something_like_this Your persistence.xml will look
something like this
****
#c_Add_updated_persistencexml_and_ProcessInstanceInfohbmxml_to_gwtconsolerserverwar c.
Add updated persistence.xml and ProcessInstanceInfo.hbm.xml to gwt-consoler-server.war
****
#d_Configure_jbpmconsole_to_binding_on_CONSOLE_IP_and_connect_to_remote_GUVNOR_IP d.
Configure jbpm-console to binding on CONSOLE_IP and connect to remote GUVNOR_IP
***
#Step_67_Deployment Step 6.7: Deployment
**
#7_Whats_next 7. What's next?
***
#Upgrading_to_the_Jbossas711Final_works Upgrading to the Jboss-as-7.1.1.Final works
***
#Using_the_Designer230Final_works Using the Designer-2.3.0.Final works
***
#Jbpmconsole_sourcecode_is_a_treasure_for_studying_jBPM_integration Jbpm-console
source-code is a treasure for studying jBPM integration.
*Disclaimer:* First, Almost material in this article I borrowed form all over the public
web. Some of most borrowed source are (in order):
* Extract from jbpm-install/build.xml Ant script.
* jBPM official user-guide:
http://docs.jboss.org/jbpm/v5.3/userguide/
http://docs.jboss.org/jbpm/v5.3/userguide/
* jBPM community user forum:
https://community.jboss.org/community/jbpm?view=discussions
https://community.jboss.org/en/jbpm?view=discussions
* BPM Geek:
http://bpmgeek.com/blog/making-jbpm5-work-remote-host
http://bpmgeek.com/blog/making-jbpm5-work-remote-host
Second, This article only provides a step by step manually deployment of each
jBPM-5.3.0.Final components. It was written by a jBPM beginner. For the official document
please refer to:
http://docs.jboss.org/jbpm/v5.3/userguide/
http://docs.jboss.org/jbpm/v5.3/userguide/
Third, this article example is in Linux. Maybe I will add ant scripts (again, heavily
extract from jbpm-install/build.xml) for faster deployment and more Windows friendlier.
h2. 1. Overview of jBPM
h3. jBPM Components
Download a copy of jbpm-5.3.0.Final-installer-full.zip (
http://sourceforge.net/projects/jbpm/files/jBPM%205/jbpm-5.3.0.Final/
http://sourceforge.net/projects/jbpm/files/jBPM%205/jbpm-5.3.0.Final/) and extract it to a
location, from now on we call it JBPM_INSTALL. JBPM_INSTALL contains all core jBPM
components.
|| *Components
* || *File in JBPM_INSTALL/lib*
|| *Description
* ||
| jbpm-runtime | jbpm-5.3.0.Final-bin.zip | jBPM Runtime, if you are willing to build a
stand alone Java application you will need this. |
| drools-guvnor | guvnor-distribution-wars-5.4.0-20120516.war | Drools-Guvnor provides
process repository. |
| designer | designer-2.2.Final-jboss7.war | JBPM2 process designer. It's integrated
with drools-guvnor. |
| form-builder | jbpm-5.3.0.Final-form-builder.war | Form builder. It's going to be
integrated with the designer.
http://blog.athico.com/2012/07/jbpm-form-builder-state-of-art.html |
| gwt-console and gwt-console-server | jbpm-5.3.0.Final-gwt-console.zip |
|
| human-task | jbpm-5.3.0.Final-human-task-war.zip |
|
Table 01: jBPM.5.3.0.Final components and their binary file
https://community.jboss.org/servlet/JiveServlet/showImage/19247/jBPM+-+In...
https://community.jboss.org/servlet/JiveServlet/downloadImage/19247/jBPM+...
Figure 01: jBPM-Internal components communication
The communication between component as described in Figure-01, this article use MySQL. But
by default, jbpm-install with "ant start.demo" will run with H2 database. From
this communication view we can separate each component deployment. Event on each
application server.
https://community.jboss.org/servlet/JiveServlet/showImage/19248/jBPM+-+Ec...
https://community.jboss.org/servlet/JiveServlet/downloadImage/19248/jBPM+...
Figure 02: The communication with Eclipse IDE
h3. Separation deployment
For a beginner, with all jBPM components are twisted together:
* It's hard to tell which message of what components. When something go wrong, which
one to focus, which one to just ignore.
* Need a way to check each component is up and running.
* Just a way to learn and experience with jBPM.
Purely from this experience and conclusion, this article will provides a manual
installation of each jBPM-5.3.0.Final component.
h2. 2. Common bugs fix after jBPM-5.3.0.Final release
h3. Building from source-code
As a beginner I occasionally meet this kind of error {userId parameter, no result, must be
positive, hornetq remote ..}. Some are must apply the fix before you can go on further.
The commits after jBPM-5.3.0.Final does fix the bug but also introduces incompatible with
other jBPM.5.3.0.Final. So this part will describes how to checkout Original
jBPM-5.3.0.Final release source code; find the Fixed patch and apply to your local
branch.
For more detailed git document, please refer to other document. This article only using
related git commands.
h4. a. Configure your git username and email
# For your local branche
git config --global user.name "Your Name"
git config --global user.email "your_email(a)addr.ess"
h4. b. Clone jbpm repository from
github.com
# We only need jbpm.git, because in version 5.3.0.Final all component on the same git
repository.
git clone
https://github.com/droolsjbpm/jbpm.git
# We have local git reposistory. We will call its directory path as jBPM_SOURCE
cd jbpm/
mvn clean install -U -Dfull -DskipTests
Optional: in "mvn clean install -U -Dfull -DskipTests" above, We can add -nsu
(no snapshot update) for faster build. Because we're only aware specific on
5.3.0.Final revision and its dependencies.
mvn clean install -U -Dfull -DskipTests -nsu
This command really takes a while, especially for the first time and your empty maven
local repository.
h4. c. Working with local repository
The jbpm is a typical maven parent project with multiple module. Two of theme {human-task;
gwt-console} are parent project too. From now on, you can use your favorite IDE with
JavaEE profile to work with this checked out repository, showing diff and applying patch.
Otherwise you can using git command as following example:
h5. List all jBPM tags
# From your jBPM_SOURCE, show tags
git tag
The output will be something like this:
5.0-CR1
5.0.0
5.1.0.CR1
5.1.0.Final
5.1.0.M1
5.1.1.Final
5.1.2.Final
5.2.0.Final
5.2.1.Final
5.2.2.Final
5.3.0.CR1
5.3.0.Final
h5. Switch to 5.3.0.Final revision tag.
Chose your local branch name, for example: update.after.5.3.0.final
git checkout 5.3.0.Final -b update.after.5.3.0.final
Result message
Switched to a new branch 'update.after.5.3.0.final'
h5. View pre-history just before jBPM team released jBPM.5.3.0.Final
git log
Example output
***@***:~/Tutorial/jbpm$ git log
commit d7640b9c0ba87d771862e8534cc607ca0f4d1aff
Author: Toni Rikkola <toni(a)rikkola.net>
Date: Mon May 14 13:25:30 2012 +0300
change to 5.4.0.Final version
commit 88440fe1430170458981c2752192df2c64c83636
Author: Maciej Swiderski <mswiders(a)redhat.com>
Date: Wed May 9 19:22:35 2012 +0200
BZ820210 - Could not initialize stateful knowledge session: loader constraint
violation when using HornetQ task service strategy
commit 80f940e2e860ac640a75114ab2780f6c2b7a865c
Author: salaboy <salaboy(a)gmail.com>
Date: Wed May 9 15:04:54 2012 +0100
- mvel workaround
...
Build your own jBPM.5.3.0.Final for the first time
mvn clean install -U -Dfull -DskipTests -nsu
Now you can working with your local git repository, update the 5.3.0.Final tag with the
patch you need. All your commit will be stored on update.after.5.3.0.final branches.
h3. Apply bug fix
h4. Bug: Could not locate named parameter [userId]
Full message
java.lang.IllegalArgumentException: org.hibernate.QueryParameterException: could not
locate named parameter [userId]
Community thread:
https://community.jboss.org/message/738335#738335
https://community.jboss.org/message/738335#738335
https://community.jboss.org/thread/200361 https://community.jboss.org/thread/200361
Fix commit: 4a47527163854b233cdb9599f54c9320e945a372
h4. Bug: No result, or connection timeout
Message
java.lang.RuntimeException: Timeout : unable to retrieve results
Treatment: With this particular deployment {separating components deployment, using MySQL}
I haven't meet this error yet.
h4. Bug: Must be positive
Full message:
2011-07-18 18:46:35,546 [FATAL] Uncaught Exception:
java.lang.IllegalArgumentException:
must be positive
at Unknown.cKb(Unknown source:0)
Fix: Not yet. (I think) this comes from GWT bug. GWT is the Google Web Toolkit that
jBPM-Console are using. Just ignore it and continue with your work.
h4. Bug: HornetQ binding only to local address.
There aren't any configuration for Human-Task-War to bind on particular address. And
by default it only listen on local address so Gwt-Console-Server cannot connect to it. Our
separating deployment needs Gwt-Console-Server to connect to Human-Task, so apply the
change-set below:
Bug track link:
https://issues.jboss.org/browse/JBPM-3720?page=com.atlassian.jira.plugin....
https://issues.jboss.org/browse/JBPM-3720?page=com.atlassian.jira.plugin....
Change set:
https://source.jboss.org/changelog/jBPM?cs=e115680b023ce0747608625f0cd616...
https://source.jboss.org/changelog/jBPM?cs=e115680b023ce0747608625f0cd616...
h2. 3. Manual jBPM components deployment
h3. Environment
h4. Check your JDK installation
# Check JAVA_HOME environment variable arcording to your operating system. In linux
echo $JAVA_HOME
# JDK Java version 1.6 or newer
java -version
h4. Check apache maven
Download and installation instruction:
http://maven.apache.org/download.html
http://maven.apache.org/download.html
# Check M2 and M2_HOME environment variables acording to your operating system. In linux
echo $M2
echo $M2_HOME
# Check Apache Maven installation
mvn -version
h4. Check apache ant
Download:
http://ant.apache.org/bindownload.cgi http://ant.apache.org/bindownload.cgi and
manual:
http://ant.apache.org/manual/index.html http://ant.apache.org/manual/index.html
# Check ANT_HOME environment variables acording to your operating system. In linux
echo $ANT_HOME
# And ANT_OPTS if it's nessessary. For example proxy configuration
echo $ANT_OPTS
-Dhttp.proxyHost=192.168.193.12 -Dhttp.proxyPort=3128
# Check Apache Ant installation
ant -version
h3. Deployment parameters
|| *Name
* || *Variables
* || *Example values* ||
| Jbpm-install | JBPM_INSTALL | /opt/download/jbpm-install |
| MySQL username/password and schema | MySQL_JBPM
MySQL_TASK | jbpm,jbpmpassword and schema name is jbpm
task,taskpassword and schema name is task |
| MySQL server IP/PORT | MySQL_IP:MySQL_PORT | 192.168.140.39:3306 |
| Group-01 components: {Drool-guvnor, Designer, Form-Builder} | GUVNOR_JBOSS
GUVNOR_IP
GUVNOR_HTTP_PORT
GUVNOR_MANAGEMENT_PORT | /opt/guvnor_jboss
192.168.140.39
8080
9999 and 9990 |
| Group-02: Human-task | HUMAN_TASK_JBOSS
HUMAN_TASK_IP
HUMAN_TASK_HTTP_PORT
HUMAN_TASK_MANAGEMENT_PORT
HUMAN_TASK_PORT-OFFSETHORNETQ_PORT | /opt/human_task_jboss
192.168.140.39
8180
10099 and 10090
port-offset="100"
1234 (Don't use default value, because we want to know if this configuratio affect or
not)
|
| Group-03: Gwt-Console and Gwt-Console-Server | CONSOLE_JBOSS
CONSOLE_IP
CONSOLE_HTTP_PORT
CONSOLE_MANAGEMENT_POR
CONSOLE_PORT_OFFSET | /opt/console_jboss
192.168.140.39
8280
10199 and 10190
port-offset="200" |
Table 02 - Deployment parameters
The "example value column" in Table 02 are values from a real deployment with
all jboss instances running on the same machine.
https://community.jboss.org/docs/DOC-16705
https://community.jboss.org/wiki/MultipleInstancesOfJBossAS7OnTheSameMachine (Approach#1)
h3. MySQL database deployment (just verify).
Verify that you can connect and login to MySQL:
# From server HUMAN_TASK_IP to MySQL_IP:MySQL_PORT
mysql -h MySQL_IP -P MySQL_Port -u MySQL_TASK -pMySQL_TASK_PASSWORD
# From server JBPM_IP to MYSQL_IP:MySQL_PORT
mysql -h MySQL_IP -P MySQL_Port -u MySQL_JBPM -pMySQL_JBPM_PASSWORD
# Note: -P (capitalized) for port; and -p (lowercase) for password.
# No space between -p and MySQL_TASK_PASSWORD. For example:
# mysql -h 192.168.140.39 -P 3306 -u task -ptaskpassword
# mysql -h 192.168.140.39 -P 3306 -u jbpm -pjbpmpassword
After this, We can just forget about firewall, network routing, MySQL permission issues
incase our persistence not work. For MySQL related document
http://dev.mysql.com/doc/refman/5.0/en/connecting.html
http://dev.mysql.com/doc/refman/5.0/en/connecting.html
h2. 4. Drools guvnor, designer, and form-builder deployment (with verify)
Login to server on GUVNOR_IP and place a copy of jbpm-install and start the installation:
h3. Step 4.1:Extract a clean copy of jboss-as-7.0.2.Final.zip to GUVNOR_JBOSS
# Set our GUVNOR_JBOSS to this example path
export GUVNOR_JBOSS=/opt/guvnor_jboss
echo $GUVNOR_JBOSS
# Go to JBPM_INSTALL directory
cd /opt/download/
unzip jbpm-5.3.0.Final-installer-full.zip
cd /opt/download/jbpm-installer
# Extract a clean copy of jboss application server. To move to /opt we need root
permission.
unzip lib/jboss-as-7.0.2.Final.zip
sudo mv jboss-as-7.0.2.Final $GUVNOR_JBOSS
# Copy guvnor, designer, form-builder
cp lib/guvnor-distribution-wars-5.4.0-20120516.war $GUVNOR_JBOSS/drools-guvnor.war
cp lib/designer-2.2.Final-jboss7.war $GUVNOR_JBOSS/designer.war
cp lib/jbpm-5.3.0.Final-form-builder.war $GUVNOR_JBOSS/jbpm-form-builder.war
# And their configurations file
cp conf/guvnor.preferences.properties $GUVNOR_JBOSS/preferences.properties
cp auth/users.properties $GUVNOR_JBOSS/
cp auth/roles.properties $GUVNOR_JBOSS/
cd $GUVNOR_JBOSS
h3. Step 4.2: Jboss configuration.
# Change GUVNOR_JBOSS/standalone/configuration/standalone.xml to bind to GUVNOR_IP. For
example
<interfaces>
<interface name="management">
<inet-address
value="${jboss.bind.address.management:192.168.140.39}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:192.168.140.39}"/>
</interface>
</interfaces>
h3. Step 4.3: drools-guvnor configuration
h4. a. Update GUVNOR_JBOSS/preferences.properties to our will be deployed designer and
form-builder
...
#Designer configuration. Change to GUVNOR_IP and GUVNOR_HTTP_PORT, in our example:
designer.url=http://192.168.140.39:8080
#Do not change this unless you know what are you doing
designer.context=designer
designer.profile=jbpm
#FormBuilder configuration
#Do not change this unless you know what are you doing. Change to GUVNOR_IP and
GUVNOR_HTTP_PORT, in our example:
formbuilder.url=http://192.168.140.39:8080
formbuilder.context=jbpm-form-builder
formbuilder.profile=guvnor
h4. b. Place a copy of GUVNOR_JBOSS/preferences.properties to
drools-guvnor.war/WEB-INF/classes/preferences.properties
# User your favorist archive manager.
Using "Open with Archive Manager" in Ubuntu Linux
h3. Step 4.4: Deploy and verify drools-guvnor component installation
h4. a. Deploy drools-guvnor
# Set our GUVNOR_JBOSS to this example path
export GUVNOR_JBOSS=/opt/guvnor_jboss
cd $GUVNOR_JBOSS
# Deploy drools-guvnor
cp drools-guvnor.war standalone/deployments/
# Verify drools-guvnor by start GUVNOR_JBOSS
bin/standalone.sh
h4. b. Verify that we have the following message in the console
...
11:55:46,779 INFO [org.jboss.web] (MSC service thread 1-2) registering web context:
/drools-guvnor
11:55:46,844 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2)
Deployed "drools-guvnor.war
h4. c. Verify that we can access the drools-guvnor
Access the
http://GUVNOR_IP:8080/drools-guvnor
http://GUVNOR_IP:GUVNOR_HTTP_PORT/drools-guvnor (In our example is
http://192.168.140.39:8080 http://192.168.140.39:8080/drools-guvnor) with the browser from
GUVNOR_IP and CONSOLE_IP
h3. Step 4.5: Deploy designer
h4. a. Apply the change for Designer as following article
http://bpmgeek.com/blog/making-jbpm5-work-remote-host
Lock for the section +"Saving and reloading process in designer could cause
failures"+ at the end of that post, we need to make following change to
designer.war/profiles/jbpm.xml
<externalloadurl protocol="http" host="GUVNOR_IP:GUVNOR_PORT"
subdomain="drools-guvnor/org.drools.guvnor.Guvnor/oryxeditor"
usr="admin" pwd="admin"/>
In our example
<externalloadurl protocol="http" host="192.168.140.39:8080"
subdomain="drools-guvnor/org.drools.guvnor.Guvnor/oryxeditor"
usr="admin" pwd="admin"/>
h4. b. Deploy designer
Simple by copy to jboss deployment directory, or with our example in Linux
# Set our GUVNOR_JBOSS to this example path
export GUVNOR_JBOSS=/opt/guvnor_jboss
cd $GUVNOR_JBOSS
# Deploy designer
cp designer.war standalone/deployments/
h4. c. Verify designer
Start jboss and verify that we have something like this
09:47:56,841 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2)
Deployed "designer.war"
09:47:56,841 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2)
Deployed "drools-guvnor.war"
https://community.jboss.org/servlet/JiveServlet/showImage/19266/Screensho...
https://community.jboss.org/servlet/JiveServlet/downloadImage/19266/Scree...
Figure 03: Verify designer installation
User your browser to connect to
http://GUVNOR_IP:8080/drools-guvnor
http://GUVNOR_IP:GUVNOR_HTTP_PORT/drools-guvnor (or
http://192.168.140.39:8080/drools-guvnor http://192.168.140.39:8080/drools-guvnor in our
example), on Left side bar, select "Knowledge Base" \ "Packages" ,
then select "Create New" \ "New BPMN2 Process" as Figure 02 above,
note that if you can create/edit and save your process.
h3. Step 4.6: Deploy form-builder
h4. a. Add users/roles configuration to GUVNOR_JBOSS
# Set our GUVNOR_JBOSS to this example path
export GUVNOR_JBOSS=/opt/guvnor_jboss
cd $GUVNOR_JBOSS
cp users.properties standalone/configuration/
cp roles.properties standalone/configuration/
h4. b. Add security domain for jbpm-form-builder in file
standalone/configuration/standalone.xml
<subsystem xmlns="urn:jboss:domain:security:1.0">
<security-domains>
..
<security-domain name="jbpm-form-builder"
cache-type="default">
<authentication>
<login-module code="UsersRoles"
flag="required">
<module-option name="usersProperties"
value="${jboss.server.config.dir}/users.properties"/>
<module-option name="rolesProperties"
value="${jboss.server.config.dir}/roles.properties"/>
</login-module>
</authentication>
</security-domain>
..
</security-domains>
</subsystem>
h4. c. Add users/roles to jbpm-form-builder.war/WEB-INF/classes/
Using your current Archive Manager to add users.properties and roles.properties to
jbpm-form-builder.war/WEB-INF/classes/
d. Make form-builder work with remote guvnor repository, like we did with the Designer
Configure using the Spring configuration files. Change
jbpm-form-builder.war/WEB/INF/springComponents.xml to GUVNOR_IP:GUVNOR_HTTP_PORT
<!-- Guvnor configuration -->
<bean id="guvnorUrl" class="java.lang.String">
<constructor-arg type="java.lang.String"
value="http://GUVNOR_IP:GUVNOR_HTTP_PORT/drools-guvnor"/>
</bean>
In our example
<!-- Guvnor configuration -->
<bean id="guvnorUrl" class="java.lang.String">
<constructor-arg type="java.lang.String"
value="http://192.168.140.39:8080/drools-guvnor"/>
</bean>
h4. d. Deploy form-builder and verify like we already did with designer
cp jbpm-form-builder.war standalone/deployments/
# Start GUVNOR_JBOSS
bin/standalone.sh
h4. e. Verify that you have
* Verify in your GUVNOR_JBOSS/standalone/logs/server.log
10:36:52,907 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2)
Deployed "drools-guvnor.war"
* Verify that
http://GUVNOR_IP:8080/jbpm-form-builder
http://GUVNOR_IP:GUVNOR_HTTP_PORT/jbpm-form-builder (
http://192.168.140.39:8080/jbpm-form-builder http://192.168.140.39:8080/jbpm-form-builder)
works.
* Verify that form-builder and guvnor repository integration works by creating a new
"Form Definitions" as in Figure 04.
https://community.jboss.org/servlet/JiveServlet/downloadImage/19305/verif...
(
https://community.jboss.org/servlet/JiveServlet/showImage/19305/verify-fo...)
Figure 04: Verify form-builder and guvnor integration
h2. 5. Task-Service or Human Task deployment (with verify).
Login to server on HUMAN_TASK_IP and place a copy of jbpm-install and start the
installation:
h3. Step 5.1:Extract a clean copy of jboss-as-7.0.2.Final.zip to HUMAN_TASK_JBOSS
# Set our HUMAN_TASK_JBOSS to this example path
export HUMAN_TASK_JBOSS=/opt/human_task_jboss
echo $HUMAN_TASK_JBOSS
# Go to JBPM_INSTALL directory
cd /opt/download/
unzip jbpm-5.3.0.Final-installer-full.zip
cd /opt/download/jbpm-installer
# Extract a clean copy of jboss application server. To move to /opt we need root
permission.
unzip lib/jboss-as-7.0.2.Final.zip
sudo mv jboss-as-7.0.2.Final $HUMAN_TASK_JBOSS
# And jbpm transactin manager library
cp jbpm-tm.jar $HUMAN_TASK_JBOSS/
# Task persistence.xml
cp task-service/resources/war/persistence.xml $HUMAN_TASK_JBOSS/
# MySQL module configuration
cp db/driver_jar_module.xml $HUMAN_TASK_JBOSS/module.xml
cd $HUMAN_TASK_JBOSS
h3. Step 5.2: Copy your custom build human-task
From JBPM_SOURCE/jbpm-human-task/jbpm-human-task-war/target
To
$HUMAN_TASK_JBOSS/jbpm-human-task-war.war
h3. Step 5.3: Jboss standalone.xml configuration
Change HUMAN_TASK_JBOSS/standalone/configuration/standalone.xml as following
h4. a. Remove pojo and jpa modules
h5. Pojo extension
<extension module="org.jboss.as.osgi"/>
<!-- Remove this line extension module="org.jboss.as.pojo"/-->
<extension module="org.jboss.as.remoting"/>
h5. And pojo domain
<subsystem xmlns="urn:jboss:domain:naming:1.0" />
<!--subsystem xmlns="urn:jboss:domain:pojo:1.0" /-->
<subsystem xmlns="urn:jboss:domain:osgi:1.0" activation="lazy">
h5. Jpa extention
<extension module="org.jboss.as.jmx"/>
<!--extension module="org.jboss.as.jpa"/-->
<extension module="org.jboss.as.logging"/>
h5. And jpa domain
<!--subsystem xmlns=urn:jboss:domain:jpa:1.0>
<jpa default-datasource=""/>
</subsystem-->
h4. b. Change port for management interface (HUMAN_TASK_MANAGEMENT_PORTs)
<management-interfaces>
<native-interface interface="management" port="10099" />
<http-interface interface="management" port="10090"/>
</management-interfaces>
h4. c. Add datasource for task-service
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/taskDS"
pool-name="MysqlTaskDSPool" enabled="true" jta="true"
use-java-context="true" use-ccm="true">
<connection-url>
jdbc:mysql://192.168.140.39:3306/task
</connection-url>
<driver>
mysql
</driver>
<pool>
<prefill>
false
</prefill>
<use-strict-min>
false
</use-strict-min>
<flush-strategy>
FailingConnectionOnly
</flush-strategy>
</pool>
<security>
<user-name>
task
</user-name>
<password>
taskpassword
</password>
</security>
</datasource>
<drivers>
<driver name="mysql" module="com.mysql">
<xa-datasource-class>
com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
h4. d. Bind to HUMAN_TASK_IP
In our example
<interfaces>
<interface name="management">
<inet-address
value="${jboss.bind.address.management:192.168.140.39}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:192.168.140.39}"/>
</interface>
</interfaces>
h4. e. Set offset-port
For our example to running on the same server as in
https://community.jboss.org/docs/DOC-16705
https://community.jboss.org/wiki/MultipleInstancesOfJBossAS7OnTheSameMachine (Approach#1)
<socket-binding-group name="standard-sockets"
default-interface="public" port-offset="100">
h3. Step 5.4: MySQL driver for jboss
h4. a. Create MySQL module directory
mkdir modules/com/mysql
mkdir modules/com/mysql/main
h4. b.Copy module declaration file
cp module.xml modules/com/mysql/main/
h4. c. Download and install mysql driver to jBoss
wget
https://repository.jboss.org/nexus/service/local/repositories/central/con...
cp mysql-connector-java-5.1.18.jar modules/com/mysql/main/mysql-connector-java.jar
h4. d. Start your HUMAN_TASK_JBOSS now
bin/standalone.sh
To verify your configuration
* Does it start Ok?
* MySQL driver loaded?
* Can you see taskDS datasource on jBoss admin console at
http://HUMAN_TASK_IP:10099/
http://HUMAN_TASK_IP:HUMAN_TASK_MANAGEMENT_PORT/ (In our example
http://192.168.140.39:10090/)?
https://community.jboss.org/servlet/JiveServlet/showImage/19269/human_tas...
https://community.jboss.org/servlet/JiveServlet/downloadImage/19269/human...
Figure 05: Veriry DataSource configuration of HUMAN_TASK_JBOSS
h3. Step 5.5: jbpm-human-task-war.war configuration
h4. a. In your jbpm-human-task-war.war file, make following modification with your current
archive manager
Remove WEB-INF/lib/netty-3.2.0.Final.jar
Add jbpm-tm.jar to WEB-INF/lib/
h4. b. Configure your WEB-INF/web.xml as following
h5. Make HornetQ as active transport
<!-- active configuration on of hornetq|mina|jms (defauls to hornetq) -->
<init-param>
<param-name>active.config</param-name>
<param-value>hornetq</param-value>
</init-param>
h5. Set HornetQ binding address and port (Remember our fix at the end of part 2) to
HUMAN_TASK_IP and HORNETQ_PORT
<!-- HornetQ configuration parameters -->
<init-param>
<param-name>hornetq.host</param-name>
<param-value>192.168.140.39</param-value>
</init-param>
<init-param>
<param-name>hornetq.port</param-name>
<param-value>1234</param-value>
</init-param>
h5. Optional: Task service persistence unit name, we will use default value so you can
keep it blank
<!-- Task Service configuration independent of transport -->
<init-param>
<param-name>task.persistence.unit</param-name>
<param-value>org.jbpm.task</param-value>
</init-param>
h5. User demo user/group call-back implementation
<!-- use org.jbpm.task.service.DefaultUserGroupCallbackImpl to configure sample user
group callback for demo purpose-->
<init-param>
<param-name>user.group.callback.class</param-name>
<param-value>org.jbpm.task.service.DefaultUserGroupCallbackImpl</param-value>
</init-param>
h5. Using demo user and group provider
<!-- use classpath:/org/jbpm/task/servlet/SampleUsers.mvel to configure sample users
for demo purpose-->
<!-- DefaultUsers.mvel is used to insert Administrator as it is required for task
server to operate -->
<init-param>
<param-name>load.users</param-name>
<param-value>classpath:/org/jbpm/task/servlet/SampleUsers.mvel</param-value>
</init-param>
<!-- use classpath:/org/jbpm/task/servlet/SampleGroups.mvel to configure sample users
for demo purpose-->
<init-param>
<param-name>load.groups</param-name>
<param-value>classpath:/org/jbpm/task/servlet/SampleGroups.mvel</param-value>
</init-param>
Look at attachement for the file jbpm_human_task_web.xml, a full copy of our example
jbpm-human-task-war/WEB-INF/web.xml
h4. c. Configure persistence.xml
h5. Change jbpmDS to taskDS
<non-jta-data-source>java:jboss/datasources/taskDS</non-jta-data-source>
h5. Modify properties to your MySQL_IP and MySQL_PORT
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.MySQLDialect"/>
<property name="hibernate.connection.driver_class"
value="com.mysql.jdbc.Driver"/>
<property name="hibernate.connection.url"
value="jdbc:mysql://MySQL_IP:MySQL_PORT/task" />
<property name="hibernate.connection.username"
value="task"/>
<property name="hibernate.connection.password"
value="taskpassword"/>
<property name="hibernate.connection.autocommit" value="false"
/>
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="create" />
<property name="hibernate.show_sql" value="true" />
</properties>
In our example:
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.MySQLDialect"/>
<property name="hibernate.connection.driver_class"
value="com.mysql.jdbc.Driver"/>
<property name="hibernate.connection.url"
value="jdbc:mysql://192.168.140.39:3306/task" />
<property name="hibernate.connection.username"
value="task"/>
<property name="hibernate.connection.password"
value="taskpassword"/>
<property name="hibernate.connection.autocommit" value="false"
/>
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="create" />
<property name="hibernate.show_sql" value="true" />
</properties>
Look at attachment for the file jbpm_human_task_persistence.xml, a full copy of our
example jbpm-human-task-war/WEB-INF/classes/META-INF/persistence.xml
h4. d. Update jpbm-human-task-war.war/WEB-INF/classes/META-INF/persistence.xml
With the modified persistence.xml in the Step c above.
h4. e. Deploy form-builder and verify like we already did with designer
cp jbpm-human-task-war.war standalone/deployments/
# Start HUMAN_TASK_JBOSS again
bin/standalone.sh
h4. e. Verify Human-Task
h5. Verify that you have message like this
18:38:58,305 INFO [stdout] (MSC service thread 1-2) HornetQ Task service started
correctly (update01) !
18:38:58,305 INFO [stdout] (MSC service thread 1-2) HornetQ Task service running (host
192.168.140.39 port 1234)...
18:38:58,318 INFO [stdout] (MSC service thread 1-2) -----------Version
5.3.0.Final_Update01-------------
18:38:58,318 INFO [stdout] (MSC service thread 1-2) Task service startup completed
successfully (update01) !
I did make a change to Task Service that include "-----------Version
5.3.0.Final_Update01-------------" make sure that our updated version are running.
h5. And your check if you can telnet to HUMAN_TASK_IP:HORNETQ_PORT from CONSOLE_IP
https://community.jboss.org/servlet/JiveServlet/showImage/102-21179-11-19...
https://community.jboss.org/servlet/JiveServlet/downloadImage/102-21179-1...
Figure 06: Verify human-task does listen on HORNETQ_PORT and "Localhost only
binding" issues is fixed.
telnet 192.168.140.39 1234
h2. 6. jBPM-Console deployment (with verify).
Login to server on CONSOLE_IP and place a copy of jbpm-install and start the
installation:
h3. Step 6.1:Extract a clean copy of jboss-as-7.0.2.Final.zip to CONSOLE_JBOSS
# Set our CONSOLE_JBOSS to this example path
export CONSOLE_JBOSS=/opt/console_jboss
echo $CONSOLE_JBOSS
# Go to JBPM_INSTALL directory
cd /opt/download/
unzip jbpm-5.3.0.Final-installer-full.zip
cd /opt/download/jbpm-installer
# Extract a clean copy of jboss application server. To move to /opt we need root
permission.
unzip lib/jboss-as-7.0.2.Final.zip
sudo mv jboss-as-7.0.2.Final $CONSOLE_JBOSS
# And jbpm transactin manager library
cp jbpm-tm.jar $CONSOLE_JBOSS/
# Demo user/role
cp auth/users.properties $CONSOLE_JBOSS/
cp auth/roles.properties $CONSOLE_JBOSS/
# jBpm persistence.xml
cp db/persistence.xml $CONSOLE_JBOSS/
cp db/ProcessInstanceInfo.hbm.xml $CONSOLE_JBOSS/
# MySQL module configuration
cp db/driver_jar_module.xml $CONSOLE_JBOSS/module.xml
cd $CONSOLE_JBOSS
# Example Evaluation process
cp -a sample $CONSOLE_JBOSS/
h3. Step 6.2 Add users/roles configuration to CONSOLE_JBOSS
cp users.properties standalone/configuration/
cp roles.properties standalone/configuration/
h3. Step 6.3: Copy your custom build jbpm-console
From
JBPM_SOURCE/jbpm-gwt/jbpm-gwt-console/target/jbpm-gwt-console-5.3.0.Final.war
To
$CONSOLE_JBOSS/jbpm-gwt-console.war
And from
JBPM_SOURCE/jbpm-gwt/jbpm-gwt-console-server/target/jbpm-gwt-console-server-5.3.0.Final.war
To $CONSOLE_JBOSS/jbpm-gwt-console-server.war
h3. Step 6.4: Jboss standalone.xml configuration
Change CONSOLE_JBOSS/standalone/configuration/standalone.xml as following
h4. a. Remove pojo and jpa modules
h5. Pojo extension
<extension module="org.jboss.as.osgi"/>
<!-- Remove this line extension module="org.jboss.as.pojo"/-->
<extension module="org.jboss.as.remoting"/>
h5. And pojo domain
<subsystem xmlns="urn:jboss:domain:naming:1.0" />
<!--subsystem xmlns="urn:jboss:domain:pojo:1.0" /-->
<subsystem xmlns="urn:jboss:domain:osgi:1.0" activation="lazy">
h5. Jpa extention
<extension module="org.jboss.as.jmx"/>
<!--extension module="org.jboss.as.jpa"/-->
<extension module="org.jboss.as.logging"/>
h5. And jpa domain
<!--subsystem xmlns=urn:jboss:domain:jpa:1.0>
<jpa default-datasource=""/>
</subsystem-->
h4. b. Change port for management interface (CONSOLE_MANAGEMENT_PORT)
<management-interfaces>
<native-interface interface="management" port="10199" />
<http-interface interface="management" port="10190"/>
</management-interfaces>
h4. c. Add datasource
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/jbpmDS"
pool-name="MysqlJbpmDSPool" enabled="true" jta="true"
use-java-context="true" use-ccm="true">
<connection-url>
jdbc:mysql://192.168.140.39:3306/jbpm
</connection-url>
<driver>
mysql
</driver>
<pool>
<prefill>
false
</prefill>
<use-strict-min>
false
</use-strict-min>
<flush-strategy>
FailingConnectionOnly
</flush-strategy>
</pool>
<security>
<user-name>
jbpm
</user-name>
<password>
jbpmpassword
</password>
</security>
</datasource>
<drivers>
<driver name="mysql" module="com.mysql">
<xa-datasource-class>
com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
h4. d. Add security domain for jbpm-console
<subsystem xmlns="urn:jboss:domain:security:1.0">
<security-domains>
..
<security-domain name="jbpm-console"
cache-type="default">
<authentication>
<login-module code="UsersRoles"
flag="required">
<module-option name="usersProperties"
value="${jboss.server.config.dir}/users.properties"/>
<module-option name="rolesProperties"
value="${jboss.server.config.dir}/roles.properties"/>
</login-module>
</authentication>
</security-domain>
..
</security-domains>
</subsystem>
h4. e. Bind to CONSOLE_IP. For example
<interfaces>
<interface name="management">
<inet-address
value="${jboss.bind.address.management:192.168.140.39}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:192.168.140.39}"/>
</interface>
</interfaces>
h4. f. Set offset-port
For our example to running on the same server as in
https://community.jboss.org/docs/DOC-16705
https://community.jboss.org/wiki/MultipleInstancesOfJBossAS7OnTheSameMachine (Approach#1)
<socket-binding-group name="standard-sockets"
default-interface="public" port-offset="200">
h3. Step 6.5: MySQL driver for jboss (identical with Step 5.4)
h4. a. Create MySQL module directory
mkdir modules/com/mysql
mkdir modules/com/mysql/main
h4. b.Copy module declaration file
cp module.xml modules/com/mysql/main/
h4. c. Download and install mysql driver to jBoss
wget
https://repository.jboss.org/nexus/service/local/repositories/central/con...
cp mysql-connector-java-5.1.18.jar modules/com/mysql/main/mysql-connector-java.jar
h4. d. Start your CONSOLE_JBOSS now
bin/standalone.sh
To verify your configuration
* Does it start Ok?
* MySQL driver loaded?
* Can you see jbpmDS datasource on jBoss admin console at
https://community.jboss.org/CONSOLE_IP:CONSOLE_MANAGEMENT_PORT
http://CONSOLE_IP:CONSOLE_MANAGEMENT_PORT/ (In our example
http://192.168.140.39:10190/
http://192.168.140.39:10190/)?
h3. Step 6.6: Gwt-console-server.war configuration
h4. a. Add users/roles to gwt-console-server.war/WEB-INF/classes/
Using your current Archive Manager to add users.properties and roles.properties to
gwt-console-server.war/WEB-INF/classes/
h4. b. Configure persistence.xml
h5. Add mapping for ProcessInstanceInfo.hbm.xml
<mapping-file>META-INF/ProcessInstanceInfo.hbm.xml</mapping-file>
h5. Change to MySQL database
<property name="hibernate.dialect"
value="org.hibernate.dialect.MySQLDialect"/>
h5. Mark Hibernate to show_sql
<property name="hibernate.show_sql" value="true" />
h5. Your persistence.xml will look something like this
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
<persistence version="1.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
http://java.sun.com/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="org.jbpm.persistence.jpa"
transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/jbpmDS</jta-data-source>
<mapping-file>META-INF/JBPMorm.xml</mapping-file>
<mapping-file>META-INF/ProcessInstanceInfo.hbm.xml</mapping-file>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<class>org.jbpm.process.audit.ProcessInstanceLog</class>
<class>org.jbpm.process.audit.NodeInstanceLog</class>
<class>org.jbpm.process.audit.VariableInstanceLog</class>
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.MySQLDialect"/>
<property name="hibernate.max_fetch_depth"
value="3"/>
<!-- hbm2ddl.auto MUST BE update! The console will otherwise overwrite the
schema with each new thread -->
<property name="hibernate.hbm2ddl.auto" value="update"
/>
<property name="hibernate.show_sql" value="true" />
<!-- for AS7 -->
<property name="hibernate.transaction.manager_lookup_class"
value="org.jbpm.integration.console.JBPMTransactionManager" />
<!-- for AS5 -->
<!-- <property
name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup" /> -->
</properties>
</persistence-unit>
</persistence>
h4. c. Add updated persistence.xml and ProcessInstanceInfo.hbm.xml to
gwt-consoler-server.war
Using your current Archive Manager to add persistence.xml and ProcessInstanceInfo.hbm.xml
to gwt-console-server.war/WEB-INF/classes/META-INF/
h4. d. Configure jbpm-console to binding on CONSOLE_IP and connect to remote GUVNOR_IP
As following article
http://bpmgeek.com/blog/making-jbpm5-work-remote-host
http://bpmgeek.com/blog/making-jbpm5-work-remote-host on Section# "A 404 error when
you try and start a process". We need to make following changes to
jbpm.console.properties file inside jbpm-gwt-core-5.1.0.Final.jar, that againt inside
jbpm-gwt-console-server.war/WEB-INF/lib/ forlder
jbpm.console.server.host=CONSOLE_IP
jbpm.console.server.port=CONSOLE_HTTP_PORT
...
#configuration properties for task service
#jbpm.console.task.service.strategy=Mina|HornetQ|JMS|Local default to Mina
jbpm.console.task.service.strategy=HornetQ
jbpm.console.task.service.host=HUMAN_TASK_IP
jbpm.console.task.service.port=HORNETQ_PORT
jbpm.console.directory=CONSOLE_JBOSS/sample/evaluation/src/main/resources
guvnor.protocol=http
guvnor.host=GUVNOR_IP:GUVNOR_HTTP_PORT
guvnor.subdomain=drools-guvnor
...
In our example
jbpm.console.server.host=192.168.140.39
jbpm.console.server.port=8280
jbpm.console.server.context=gwt-console-server
#configuration properties for task service
#jbpm.console.task.service.strategy=Mina|HornetQ|JMS|Local default to Mina
jbpm.console.task.service.strategy=HornetQ
jbpm.console.task.service.host=192.168.140.39
jbpm.console.task.service.port=1234
jbpm.console.directory=/opt/console_jboss/sample/evaluation/src/main/resources
guvnor.protocol=http
guvnor.host=192.168.140.39:8180
guvnor.subdomain=drools-guvnor
...
h3. Step 6.7: Deployment
cp jbpm-gwt-console-server.war standalone/deployments/
cp jbpm-gwt-console.war standalone/deployments/
And verify that
* jbpm-gwt-console-server is deployed
* jbpm-gwt-console is deployed
* And use your browser to verify that
http://CONSOLE_IP:8280/jbpm-console
http://CONSOLE_IP:CONSOLE_HTTP_PORT/jbpm-console (
http://192.168.140.39:8280/jbpm-console
http://192.168.140.39:8280/jbpm-console) works.
h2. 7. What's next?
h3. Upgrading to the Jboss-as-7.1.1.Final works
Following the same above steps with jboss-as-7.1.1.Final works. This make
"interface" and "port-offset" configuration in standalone.xml more
cleaner. In our current example setup, I just copy over {modified war files,
users.properties, roles.properties, database module} to new JBoss and make the change in
standalone.xml files.
This upgrading has a "Vfs" issue, but we can just ignore it. More here:
*
https://community.jboss.org/message/753657#753657
https://community.jboss.org/message/753657#753657
*
https://community.jboss.org/thread/197349?tstart=0
https://community.jboss.org/thread/197349?tstart=0
*
https://community.jboss.org/thread/197080 https://community.jboss.org/thread/197080
h3. Using the Designer-2.3.0.Final works
Nothing to say about this upgrades.
h3. Jbpm-console source-code is a treasure for studying jBPM integration.
Just like jbpm-install/build.xml for study jBPM components in one way or another.
--------------------------------------------------------------
Comment by going to Community
[
https://community.jboss.org/docs/DOC-21179]
Create a new document in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=102&a...]