<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    jBPM-5.3.0.Final Manual Deployment Guide for Beginner
</h3>
<span style="margin-bottom: 10px;">
    modified by <a href="https://community.jboss.org/people/quangtin3">quangtin3</a> in <i>jBPM</i> - <a href="https://community.jboss.org/docs/DOC-21179">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p><div class="toc" style="border: 1px dashed black; padding: 10px;"><ul><ul><li>
<a class="jive-link-anchor-small" href="#1_Overview_of_jBPM">1. Overview of jBPM</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#jBPM_Components">jBPM Components</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Separation_deployment">Separation deployment</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#2_Common_bugs_fix_after_jBPM530Final_release">2. Common bugs fix after jBPM-5.3.0.Final release</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#Building_from_sourcecode">Building from source-code</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#a_Configure_your_git_username_and_email">a. Configure your git username and email</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#b_Clone_jbpm_repository_from_githubcom">b. Clone jbpm repository from github.com</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#c_Working_with_local_repository">c. Working with local repository</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#List_all_jBPM_tags_">List all jBPM tags </a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Switch_to_530Final_revision_tag">Switch to 5.3.0.Final revision tag.</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#View_prehistory_just_before_jBPM_team_released_jBPM530Final">View pre-history just before jBPM team released jBPM.5.3.0.Final</a>
</li>
</ul></ul><li>
<a class="jive-link-anchor-small" href="#Apply_bug_fix">Apply bug fix</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#Bug_Could_not_locate_named_parameter_userId">Bug: Could not locate named parameter [userId]</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Bug_No_result_or_connection_timeout">Bug: No result, or connection timeout</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Bug_Must_be_positive">Bug: Must be positive</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Bug_HornetQ_binding_only_to_local_address">Bug: HornetQ binding only to local address.</a>
</li>
</ul></ul><li>
<a class="jive-link-anchor-small" href="#3_Manual_jBPM_components_deployment">3. Manual jBPM components deployment</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#Environment">Environment</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#Check_your_JDK_installation">Check your JDK installation</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Check_apache_maven">Check apache maven</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Check_apache_ant">Check apache ant</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#Deployment_parameters">Deployment parameters</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#MySQL_database_deployment_just_verify">MySQL database deployment (just verify).</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#4_Drools_guvnor_designer_and_formbuilder_deployment_with_verify">4. Drools guvnor, designer, and form-builder deployment (with verify)</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#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</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Step_42_Jboss_configuration">Step 4.2: Jboss configuration.</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Step_43_droolsguvnor_configuration">Step 4.3: drools-guvnor configuration</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#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</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#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</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#Step_44_Deploy_and_verify_droolsguvnor_component_installation">Step 4.4: Deploy and verify drools-guvnor component installation</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#a_Deploy_droolsguvnor">a. Deploy drools-guvnor</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#b_Verify_that_we_have_the_following_message_in_the_console">b. Verify that we have the following message in the console</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#c_Verify_that_we_can_access_the_droolsguvnor">c. Verify that we can access the drools-guvnor</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#Step_45_Deploy_designer">Step 4.5: Deploy designer</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#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 </a>
</li>
<li>
<a class="jive-link-anchor-small" href="#b_Deploy_designer">b. Deploy designer</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#c_Verify_designer">c. Verify designer</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#Step_46_Deploy_formbuilder">Step 4.6: Deploy form-builder</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#a_Add_usersroles_configuration_to_GUVNOR_JBOSS">a. Add users/roles configuration to GUVNOR_JBOSS</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#b_Add_security_domain_for_jbpmformbuilder_in_file_standaloneconfigurationstandalonexml">b. Add security domain for jbpm-form-builder in file standalone/configuration/standalone.xml</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#c_Add_usersroles_to_jbpmformbuilderwarWEBINFclasses">c. Add users/roles to jbpm-form-builder.war/WEB-INF/classes/</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#d_Deploy_formbuilder_and_verify_like_we_already_did_with_designer">d. Deploy form-builder and verify like we already did with designer</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#e_Verify_that_you_have">e. Verify that you have</a>
</li>
</ul></ul><li>
<a class="jive-link-anchor-small" href="#5_TaskService_or_Human_Task_deployment_with_verify">5. Task-Service or Human Task deployment (with verify).</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#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</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Step_52_Copy_your_custom_build_humantask_">Step 5.2: Copy your custom build human-task </a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Step_53_Jboss_standalonexml_configuration_">Step 5.3: Jboss standalone.xml configuration </a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#a_Remove_pojo_and_jpa_modules">a. Remove pojo and jpa modules</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#Pojo_extension">Pojo extension</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#And_pojo_domain">And pojo domain</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Jpa_extention">Jpa extention</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#_And_jpa_domain"> And jpa domain</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#b_Change_port_for_management_interface_HUMAN_TASK_MANAGEMENT_PORTs">b. Change port for management interface (HUMAN_TASK_MANAGEMENT_PORTs)</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#c_Add_datasource_for_taskservice">c. Add datasource for task-service</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#d_Bind_to_HUMAN_TASK_IP">d. Bind to HUMAN_TASK_IP</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#e_Set_offsetport">e. Set offset-port</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#Step_54_MySQL_driver_for_jboss">Step 5.4: MySQL driver for jboss</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#a_Create_MySQL_module_directory">a. Create MySQL module directory</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#bCopy_module_declaration_file">b.Copy module declaration file</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#c_Download_and_install_mysql_driver_to_jBoss">c. Download and install mysql driver to jBoss</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#d_Start_your_HUMAN_TASK_JBOSS_now">d. Start your HUMAN_TASK_JBOSS now</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#Step_55_jbpmhumantaskwarwar_configuration">Step 5.5: jbpm-human-task-war.war configuration</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#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</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#b_Configure_your_WEBINFwebxml_as_following">b. Configure your WEB-INF/web.xml as following</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#Make_HornetQ_as_active_transport">Make HornetQ as active transport</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#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</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#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</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#User_demo_usergroup_callback_implementation">User demo user/group call-back implementation</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Using_demo_user_and_group_provider">Using demo user and group provider</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#c_Configure_persistencexml_">c. Configure persistence.xml </a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#Change_jbpmDS_to_taskDS">Change jbpmDS to taskDS</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Modify_properties_to_your_MySQL_IP_and_MySQL_PORT">Modify properties to your MySQL_IP and MySQL_PORT</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#d_Update_jpbmhumantaskwarwarWEBINFclassesMETAINFpersistencexml">d. Update jpbm-human-task-war.war/WEB-INF/classes/META-INF/persistence.xml</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#e_Deploy_formbuilder_and_verify_like_we_already_did_with_designer">e. Deploy form-builder and verify like we already did with designer</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#e_Verify_HumanTask">e. Verify Human-Task</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#Verify_that_you_have_message_like_this">Verify that you have message like this</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#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</a>
</li>
</ul></ul></ul><li>
<a class="jive-link-anchor-small" href="#6_jBPMConsole_deployment_with_verify">6. jBPM-Console deployment (with verify).</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#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</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Step_62_Add_usersroles_configuration_to_CONSOLE_JBOSS">Step 6.2 Add users/roles configuration to CONSOLE_JBOSS</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Step_63_Copy_your_custom_build_jbpmconsole">Step 6.3: Copy your custom build jbpm-console</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Step_64_Jboss_standalonexml_configuration">Step 6.4: Jboss standalone.xml configuration</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#a_Remove_pojo_and_jpa_modules_605970">a. Remove pojo and jpa modules</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#Pojo_extension_521132">Pojo extension</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#And_pojo_domain_802756">And pojo domain</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Jpa_extention_672964">Jpa extention</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#And_jpa_domain">And jpa domain</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#b_Change_port_for_management_interface_CONSOLE_MANAGEMENT_PORT">b. Change port for management interface (CONSOLE_MANAGEMENT_PORT)</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#c_Add_datasource">c. Add datasource</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#d_Add_security_domain_for_jbpmconsole">d. Add security domain for jbpm-console</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#e_Bind_to_CONSOLE_IP_For_example">e. Bind to CONSOLE_IP. For example</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#f_Set_offsetport">f. Set offset-port</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#Step_65_MySQL_driver_for_jboss_identical_with_Step_54">Step 6.5: MySQL driver for jboss (identical with Step 5.4)</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#a_Create_MySQL_module_directory_308940">a. Create MySQL module directory</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#bCopy_module_declaration_file_912339">b.Copy module declaration file</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#c_Download_and_install_mysql_driver_to_jBoss_181750">c. Download and install mysql driver to jBoss</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#d_Start_your_CONSOLE_JBOSS_now">d. Start your CONSOLE_JBOSS now</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#Step_66_Gwtconsoleserverwar_configuration">Step 6.6: Gwt-console-server.war configuration</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#a_Add_usersroles_to_gwtconsoleserverwarWEBINFclasses">a. Add users/roles to gwt-console-server.war/WEB-INF/classes/</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#b_Configure_persistencexml">b. Configure persistence.xml</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#Add_mapping_for_ProcessInstanceInfohbmxml">Add mapping for ProcessInstanceInfo.hbm.xml</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Change_to_MySQL_database">Change to MySQL database</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Mark_Hibernate_to_show_sql">Mark Hibernate to show_sql</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Your_persistencexml_will_look_something_like_this">Your persistence.xml will look something like this</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#c_Add_updated_persistencexml_and_ProcessInstanceInfohbmxml_to_gwtconsolerserverwar">c. Add updated persistence.xml and ProcessInstanceInfo.hbm.xml to gwt-consoler-server.war</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#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</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#Step_67_Deployment">Step 6.7: Deployment</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#7_Whats_next">7. What's next?</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#Upgrading_to_the_Jbossas711Final_works">Upgrading to the Jboss-as-7.1.1.Final works</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Using_the_Designer230Final_works">Using the Designer-2.3.0.Final works</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Jbpmconsole_sourcecode_is_a_treasure_for_studying_jBPM_integration">Jbpm-console source-code is a treasure for studying jBPM integration.</a>
</li>
</ul></ul></ul></div></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>Disclaimer:</strong> First, Almost material in this article I borrowed form all over the public web. Some of most borrowed source are (in order):</p><ul><li>Extract from jbpm-install/build.xml Ant script.</li><li>jBPM official user-guide: <a class="jive-link-external-small" href="http://docs.jboss.org/jbpm/v5.3/userguide/">http://docs.jboss.org/jbpm/v5.3/userguide/</a></li><li>jBPM community user forum: <a class="" href="https://community.jboss.org/community/jbpm?view=discussions">https://community.jboss.org/en/jbpm?view=discussions</a></li><li>BPM Geek: <a class="jive-link-external-small" href="http://bpmgeek.com/blog/making-jbpm5-work-remote-host">http://bpmgeek.com/blog/making-jbpm5-work-remote-host</a></li></ul><p>Second, This article only provides a&#160; 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: <a class="jive-link-external-small" href="http://docs.jboss.org/jbpm/v5.3/userguide/">http://docs.jboss.org/jbpm/v5.3/userguide/</a></p><p>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.</p><h2 id="1_Overview_of_jBPM" style="text-align: start;">1. Overview of jBPM</h2><h3 id="jBPM_Components">jBPM Components</h3><p>Download a copy of jbpm-5.3.0.Final-installer-full.zip (<a class="jive-link-external-small" href="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/</a>) and extract it to a location, from now on we call it JBPM_INSTALL. JBPM_INSTALL contains all core jBPM components.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><table border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 80%; border: 1px solid #000000;"><tbody><tr><th align="center" style="border:1px solid black;border: 1px solid #000000;background-color: #6690bc;" valign="middle"><span style="color: #ffffff;"><strong>Components<br/></strong></span></th><th align="center" style="border:1px solid black;border: 1px solid #000000;background-color: #6690bc;" valign="middle"><span style="color: #ffffff;"><strong>File in JBPM_INSTALL/lib</strong></span><br/></th><th align="center" style="border:1px solid black;border: 1px solid #000000;background-color: #6690bc;" valign="middle"><span style="color: #ffffff;"><strong>Description<br/></strong></span></th></tr><tr><td style="border:1px solid black;border: 1px solid #000000;">jbpm-runtime</td><td style="border:1px solid black;border: 1px solid #000000;">jbpm-5.3.0.Final-bin.zip</td><td style="border:1px solid black;border: 1px solid #000000;">jBPM Runtime, if you are willing to build a stand alone Java application you will need this.</td></tr><tr><td style="border:1px solid black;border: 1px solid #000000;">drools-guvnor</td><td style="border:1px solid black;border: 1px solid #000000;">guvnor-distribution-wars-5.4.0-20120516.war</td><td style="border:1px solid black;border: 1px solid #000000;">Drools-Guvnor provides process repository.</td></tr><tr><td style="border:1px solid black;border: 1px solid #000000;">designer</td><td style="border:1px solid black;border: 1px solid #000000;">designer-2.2.Final-jboss7.war</td><td style="border:1px solid black;border: 1px solid #000000;">JBPM2 process designer. It's integrated with drools-guvnor.</td></tr><tr><td style="border:1px solid black;border: 1px solid #000000;">form-builder</td><td style="border:1px solid black;border: 1px solid #000000;">jbpm-5.3.0.Final-form-builder.war</td><td style="border:1px solid black;border: 1px solid #000000;">Form builder. It's going to be integrated with the designer. <a class="jive-link-external-small" href="http://blog.athico.com/2012/07/jbpm-form-builder-state-of-art.html">http://blog.athico.com/2012/07/jbpm-form-builder-state-of-art.html</a></td></tr><tr><td style="border:1px solid black;border: 1px solid #000000;">gwt-console and gwt-console-server</td><td style="border:1px solid black;border: 1px solid #000000;">jbpm-5.3.0.Final-gwt-console.zip</td><td style="border:1px solid black;border: 1px solid #000000;"><br/></td></tr><tr><td style="border:1px solid black;border: 1px solid #000000;">human-task</td><td style="border:1px solid black;border: 1px solid #000000;">jbpm-5.3.0.Final-human-task-war.zip</td><td style="border:1px solid black;border: 1px solid #000000;"><br/></td></tr></tbody></table><p style="text-align: center;">Table 01: jBPM.5.3.0.Final components and their binary file</p><p><a href="https://community.jboss.org/servlet/JiveServlet/showImage/19247/jBPM+-+Internal+Components+Communication.png"><span> https://community.jboss.org/servlet/JiveServlet/downloadImage/19247/jBPM+-+Internal+Components+Communication.png </span></a></p><p style="text-align: center;">Figure 01: jBPM-Internal components communication</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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.</p><p><a href="https://community.jboss.org/servlet/JiveServlet/showImage/19248/jBPM+-+Eclipse+and+Reporting+Communication.png"><span> https://community.jboss.org/servlet/JiveServlet/downloadImage/19248/jBPM+-+Eclipse+and+Reporting+Communication.png </span></a></p><p style="text-align: center;">Figure 02: The communication with Eclipse IDE</p><h3 id="Separation_deployment">Separation deployment</h3><p style="text-align: start;">For a beginner, with all jBPM components are twisted together:</p><ul><li style="text-align: start;">It's hard to tell which message of what components. When something go wrong, which one to focus, which one to just ignore.</li><li style="text-align: start;">Need a way to check each component is up and running.</li><li style="text-align: start;">Just a way to learn and experience with jBPM.</li></ul><p>Purely from this experience and conclusion, this article will provides a manual installation of each jBPM-5.3.0.Final component.</p><h2 id="2_Common_bugs_fix_after_jBPM530Final_release">2. Common bugs fix after jBPM-5.3.0.Final release</h2><h3 id="Building_from_sourcecode">Building from source-code</h3><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>For more detailed git document, please refer to other document. This article only using related git commands.</p><h4 id="a_Configure_your_git_username_and_email">a. Configure your git username and email</h4><pre class="jive-pre"><code class="jive-code"># For your local branche
git config --global user.name "Your Name"
git config --global user.email "your_email@addr.ess"
</code></pre><h4 id="b_Clone_jbpm_repository_from_githubcom">b. Clone jbpm repository from github.com</h4><pre class="jive-pre"><code class="jive-code"># 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
</code></pre><p>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.</p><pre class="jive-pre"><code class="jive-code">mvn clean install -U -Dfull -DskipTests -nsu
</code></pre><p>This command really takes a while, especially for the first time and your empty maven local repository.</p><h4 id="c_Working_with_local_repository">c. Working with local repository</h4><p>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:</p><h5 id="List_all_jBPM_tags_">List all jBPM tags </h5><pre class="jive-pre"><code class="jive-code"># From your jBPM_SOURCE, show tags
git tag
</code></pre><p>The output will be something like this:</p><pre class="jive-pre"><code class="jive-code">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
</code></pre><h5 id="Switch_to_530Final_revision_tag">Switch to 5.3.0.Final revision tag.</h5><p>Chose your local branch name, for example: <span style="color: #ff6600;">update.after.5.3.0.final</span></p><pre class="jive-pre"><code class="jive-code">git checkout 5.3.0.Final&#160; -b update.after.5.3.0.final
</code></pre><p>Result message</p><pre class="jive-pre"><code class="jive-code">Switched to a new branch 'update.after.5.3.0.final'
</code></pre><h5 id="View_prehistory_just_before_jBPM_team_released_jBPM530Final">View pre-history just before jBPM team released jBPM.5.3.0.Final</h5><pre class="jive-pre"><code class="jive-code">git log
</code></pre><p>Example output</p><pre class="jive-pre"><code class="jive-code">***@***:~/Tutorial/jbpm$ git log
commit d7640b9c0ba87d771862e8534cc607ca0f4d1aff
Author: Toni Rikkola &lt;toni@rikkola.net&gt;
Date:&#160;&#160; Mon May 14 13:25:30 2012 +0300

&#160;&#160;&#160; change to 5.4.0.Final version

commit 88440fe1430170458981c2752192df2c64c83636
Author: Maciej Swiderski &lt;mswiders@redhat.com&gt;
Date:&#160;&#160; Wed May 9 19:22:35 2012 +0200

&#160;&#160;&#160; BZ820210 - Could not initialize stateful knowledge session: loader constraint violation when using HornetQ task service strategy

commit 80f940e2e860ac640a75114ab2780f6c2b7a865c
Author: salaboy &lt;salaboy@gmail.com&gt;
Date:&#160;&#160; Wed May 9 15:04:54 2012 +0100

&#160;&#160;&#160; - mvel workaround

...
</code></pre><p>Build your own jBPM.5.3.0.Final for the first time</p><pre class="jive-pre"><code class="jive-code">mvn clean install -U -Dfull -DskipTests -nsu
</code></pre><p>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 <span style="color: #ff6600;">update.after.5.3.0.final <span style="color: #000000;">branches.</span><br/></span></p><h3 id="Apply_bug_fix">Apply bug fix</h3><h4 id="Bug_Could_not_locate_named_parameter_userId">Bug: Could not locate named parameter [userId]</h4><p>Full message</p><pre class="jive-pre"><code class="jive-code">java.lang.IllegalArgumentException: org.hibernate.QueryParameterException: could not locate named parameter [userId]
</code></pre><p>Community thread:</p><p><a class="jive-link-message-small" href="https://community.jboss.org/message/738335#738335">https://community.jboss.org/message/738335#738335</a></p><p> <a class="jive-link-thread-small" href="https://community.jboss.org/thread/200361">https://community.jboss.org/thread/200361</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Fix commit: 4a47527163854b233cdb9599f54c9320e945a372</p><h4 id="Bug_No_result_or_connection_timeout">Bug: No result, or connection timeout</h4><p>Message</p><pre class="jive-pre"><code class="jive-code">java.lang.RuntimeException: Timeout : unable to retrieve results
</code></pre><p>Treatment: With this particular deployment {separating components deployment, using MySQL} I haven't meet this error yet.</p><h4 id="Bug_Must_be_positive">Bug: Must be positive</h4><p>Full message: </p><pre class="jive-pre"><code class="jive-code">2011-07-18 18:46:35,546 [FATAL] Uncaught Exception:
java.lang.IllegalArgumentException:
must be positive
&#160;&#160;&#160; at Unknown.cKb(Unknown source:0)
</code></pre><p>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.</p><h4 id="Bug_HornetQ_binding_only_to_local_address">Bug: HornetQ binding only to local address.</h4><p>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:</p><p>Bug track link: <a class="jive-link-external-small" href="https://issues.jboss.org/browse/JBPM-3720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel">https://issues.jboss.org/browse/JBPM-3720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel</a></p><p>Change set: <a class="jive-link-external-small" href="https://source.jboss.org/changelog/jBPM?cs=e115680b023ce0747608625f0cd61665cd09df40">https://source.jboss.org/changelog/jBPM?cs=e115680b023ce0747608625f0cd61665cd09df40</a></p><h2 id="3_Manual_jBPM_components_deployment">3. Manual jBPM components deployment</h2><h3 id="Environment">Environment</h3><h4 id="Check_your_JDK_installation">Check your JDK installation</h4><pre class="jive-pre"><code class="jive-code"># Check JAVA_HOME environment variable arcording to your operating system. In linux
echo $JAVA_HOME

# JDK Java version 1.6 or newer
java -version
</code></pre><h4 id="Check_apache_maven">Check apache maven</h4><p>Download and installation instruction: <a class="jive-link-external-small" href="http://maven.apache.org/download.html">http://maven.apache.org/download.html</a></p><pre class="jive-pre"><code class="jive-code"># Check M2 and&#160; M2_HOME environment variables acording to your operating system. In linux
echo $M2
echo $M2_HOME

# Check Apache Maven installation
mvn -version
</code></pre><h4 id="Check_apache_ant">Check apache ant</h4><p>Download: <a class="jive-link-external-small" href="http://ant.apache.org/bindownload.cgi">http://ant.apache.org/bindownload.cgi</a> and manual: <a class="jive-link-external-small" href="http://ant.apache.org/manual/index.html">http://ant.apache.org/manual/index.html</a></p><pre class="jive-pre"><code class="jive-code"># Check ANT_HOME environment variables acording to&#160; 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
</code></pre><h3 id="Deployment_parameters">Deployment parameters</h3><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><table border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"><tbody><tr><th style="border:1px solid black;border: 1px solid #000000;font-family: arial,helvetica,sans-serif;padding: 3px;text-align: -moz-center;color: #333333;background-color: #6690bc;" valign="middle"><span style="color: #ffffff;"><strong>Name<br/></strong></span></th><th style="border:1px solid black;border: 1px solid #000000;font-family: arial,helvetica,sans-serif;padding: 3px;text-align: -moz-center;color: #333333;background-color: #6690bc;" valign="middle"><span style="color: #ffffff;"><strong>Variables<br/></strong></span></th><th style="border:1px solid black;border: 1px solid #000000;font-family: arial,helvetica,sans-serif;padding: 3px;text-align: -moz-center;color: #333333;background-color: #6690bc;" valign="middle"><span style="color: #ffffff;"><strong>Example values</strong></span></th></tr><tr><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;">Jbpm-install</td><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;">JBPM_INSTALL</td><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;">/opt/download/jbpm-install</td></tr><tr><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;">MySQL username/password and schema</td><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;"><p>MySQL_JBPM</p><p>MySQL_TASK</p></td><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;"><p>jbpm,jbpmpassword and schema name is jbpm</p><p>task,taskpassword and schema name is task</p></td></tr><tr><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;">MySQL server IP/PORT</td><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;">MySQL_IP:MySQL_PORT</td><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;">192.168.140.39:3306</td></tr><tr><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;">Group-01 components: {Drool-guvnor, Designer, Form-Builder}</td><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;"><p>GUVNOR_JBOSS</p><p>GUVNOR_IP</p><p>GUVNOR_HTTP_PORT</p><p>GUVNOR_MANAGEMENT_PORT</p></td><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;"><p>/opt/guvnor_jboss</p><p>192.168.140.39</p><p>8080</p><p>9999 and 9990</p></td></tr><tr><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;">Group-02: Human-task</td><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;"><p>HUMAN_TASK_JBOSS</p><p>HUMAN_TASK_IP</p><p>HUMAN_TASK_HTTP_PORT</p><p>HUMAN_TASK_MANAGEMENT_PORT</p>HUMAN_TASK_PORT-OFFSET<p>HORNETQ_PORT</p></td><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;"><p>/opt/human_task_jboss</p><p>192.168.140.39</p><p>8180</p><p>10099 and 10090</p><p><span style="color: #ff6600;">port-offset="100"</span></p><p><span style="color: #ff6600;">1234 <span style="color: #000000;">(Don't use default value, because we want to know if this configuratio affect or not)</span><br/></span></p></td></tr><tr><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;">Group-03: Gwt-Console and Gwt-Console-Server</td><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;"><p>CONSOLE_JBOSS</p><p>CONSOLE_IP</p><p>CONSOLE_HTTP_PORT</p><p>CONSOLE_MANAGEMENT_POR</p><p>CONSOLE_PORT_OFFSET</p></td><td style="border:1px solid black;border: 1px solid #000000;background-color: transparent;padding: 3px;text-align: left;color: #000000;"><p>/opt/console_jboss</p><p>192.168.140.39</p><p>8280</p><p>10199 and 10190</p><p><span style="color: #ff6600;">port-offset="200"</span></p></td></tr></tbody></table><p style="text-align: center;">Table 02 - Deployment parameters</p><p>The "example value column" in Table 02 are values from a real deployment with all jboss instances running&#160; on the same machine. <a class="jive-link-wiki-small" href="https://community.jboss.org/docs/DOC-16705">https://community.jboss.org/wiki/MultipleInstancesOfJBossAS7OnTheSameMachine</a> (Approach#1)</p><h3 id="MySQL_database_deployment_just_verify">MySQL database deployment (just verify).</h3><p>Verify that you can connect and login to MySQL:</p><pre class="jive-pre"><code class="jive-code"># From server HUMAN_TASK_IP to MySQL_IP:MySQL_PORT
mysql -h MySQL_IP -P MySQL_Port&#160; -u MySQL_TASK -pMySQL_TASK_PASSWORD

# From server JBPM_IP to MYSQL_IP:MySQL_PORT
mysql -h MySQL_IP -P MySQL_Port&#160; -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: 
#&#160;&#160; mysql -h 192.168.140.39 -P 3306 -u task -ptaskpassword
#&#160;&#160; mysql -h 192.168.140.39 -P 3306 -u jbpm -pjbpmpassword
</code></pre><p>After this, We can just forget about firewall, network routing, MySQL permission issues incase our persistence not work. For MySQL related document <a class="jive-link-external-small" href="http://dev.mysql.com/doc/refman/5.0/en/connecting.html">http://dev.mysql.com/doc/refman/5.0/en/connecting.html</a></p><h2 id="4_Drools_guvnor_designer_and_formbuilder_deployment_with_verify">4. Drools guvnor, designer, and form-builder deployment (with verify)</h2><p>Login to server on GUVNOR_IP and place a copy of jbpm-install and start the installation:</p><h3 id="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</h3><pre class="jive-pre"><code class="jive-code"># 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
</code></pre><h3 id="Step_42_Jboss_configuration">Step 4.2: Jboss configuration.</h3><pre class="jive-pre"><code class="jive-code jive-xml"># Change GUVNOR_JBOSS/standalone/configuration/standalone.xml to bind to GUVNOR_IP. For example
<span class="jive-xml-tag">&lt;interfaces&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;interface name="management"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;inet-address value="${jboss.bind.address.management:192.168.140.39}"/&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/interface&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;interface name="public"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;inet-address value="${jboss.bind.address:192.168.140.39}"/&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/interface&gt;</span>
<span class="jive-xml-tag">&lt;/interfaces&gt;</span>
</code></pre><h3 id="Step_43_droolsguvnor_configuration">Step 4.3: drools-guvnor configuration</h3><h4 id="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</h4><pre class="jive-pre"><code class="jive-code">...
#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
</code></pre><h4 id="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</h4><p># User your favorist archive manager.</p><p>Using "Open with Archive Manager" in&#160; Ubuntu Linux</p><h3 id="Step_44_Deploy_and_verify_droolsguvnor_component_installation">Step 4.4: Deploy and verify drools-guvnor component installation</h3><h4 id="a_Deploy_droolsguvnor">a. Deploy drools-guvnor</h4><pre class="jive-pre"><code class="jive-code"># 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
</code></pre><h4 id="b_Verify_that_we_have_the_following_message_in_the_console">b. Verify that we have the following message in the console</h4><pre class="jive-pre"><code class="jive-code">...
11:55:46,779 INFO&#160; [org.jboss.web] (MSC service thread 1-2) registering web context: /drools-guvnor
11:55:46,844 INFO&#160; [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "drools-guvnor.war
</code></pre><h4 id="c_Verify_that_we_can_access_the_droolsguvnor">c. Verify that we can access the drools-guvnor</h4><p><span>Access the </span><a class="jive-link-external-small" href="http://GUVNOR_IP:8080/drools-guvnor" target="_blank">http://GUVNOR_IP:GUVNOR_HTTP_PORT/drools-guvnor</a><span> (In our example is </span><a class="jive-link-external-small" href="http://192.168.140.39:8080" target="_blank">http://192.168.140.39:8080/drools-guvnor</a>) with the <span style="color: #000000;">browser from <span style="color: #ff6600;">GUVNOR_IP</span> and <span style="color: #ff6600;">CONSOLE_IP</span></span></p><h3 id="Step_45_Deploy_designer">Step 4.5: Deploy designer</h3><h4 id="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 </h4><p>Lock for the section <em>"Saving and reloading process in designer could cause failures"</em> at the end of that post, we need to make following change to designer.war/profiles/<span style="color: #ff6600;">jbpm.xml</span></p><pre class="jive-pre"><code class="jive-code">&lt;externalloadurl protocol="http" host="GUVNOR_IP:GUVNOR_PORT" subdomain="drools-guvnor/org.drools.guvnor.Guvnor/oryxeditor" usr="admin" pwd="admin"/&gt;</code></pre><p>In our example</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;externalloadurl protocol="http" host="192.168.140.39:8080" subdomain="drools-guvnor/org.drools.guvnor.Guvnor/oryxeditor" usr="admin" pwd="admin"/&gt;</span>
</code></pre><h4 id="b_Deploy_designer">b. Deploy designer</h4><p>Simple by copy to jboss deployment directory, or with our example in Linux</p><pre class="jive-pre"><code class="jive-code"># Set our GUVNOR_JBOSS to this example path
export GUVNOR_JBOSS=/opt/guvnor_jboss
cd $GUVNOR_JBOSS

# Deploy designer
cp designer.war standalone/deployments/
</code></pre><h4 id="c_Verify_designer">c. Verify designer</h4><p>Start jboss and verify that we have something like this</p><pre class="jive-pre"><code class="jive-code">09:47:56,841 INFO&#160; [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "designer.war"
09:47:56,841 INFO&#160; [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "drools-guvnor.war"
</code></pre><p><a href="https://community.jboss.org/servlet/JiveServlet/showImage/19266/Screenshot.png"><span> https://community.jboss.org/servlet/JiveServlet/downloadImage/19266/Screenshot.png </span></a></p><p style="text-align: center;">Figure 03: Verify designer installation</p><p><span>User your browser to connect to </span><a class="jive-link-external-small" href="http://GUVNOR_IP:8080/drools-guvnor" target="_blank">http://GUVNOR_IP:GUVNOR_HTTP_PORT/drools-guvnor</a><span> (or </span><a class="jive-link-external-small" href="http://192.168.140.39:8080/drools-guvnor" target="_blank">http://192.168.140.39:8080/drools-guvnor</a><span> 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.</span></p><h3 id="Step_46_Deploy_formbuilder">Step 4.6: Deploy form-builder</h3><h4 id="a_Add_usersroles_configuration_to_GUVNOR_JBOSS">a. Add users/roles configuration to GUVNOR_JBOSS</h4><pre class="jive-pre"><code class="jive-code"># 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/
</code></pre><h4 id="b_Add_security_domain_for_jbpmformbuilder_in_file_standaloneconfigurationstandalonexml">b. Add security domain for jbpm-form-builder in file standalone/configuration/standalone.xml</h4><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;subsystem xmlns="urn:jboss:domain:security:1.0"&gt;</span>
&#160;&#160; <span class="jive-xml-tag">&lt;security-domains&gt;</span>
..
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;security-domain name="jbpm-form-builder" cache-type="default"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;authentication&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;login-module code="UsersRoles" flag="required"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;module-option name="usersProperties" value="${jboss.server.config.dir}/users.properties"/&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;module-option name="rolesProperties" value="${jboss.server.config.dir}/roles.properties"/&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/login-module&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/authentication&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/security-domain&gt;</span>
..
&#160;&#160; <span class="jive-xml-tag">&lt;/security-domains&gt;</span>
<span class="jive-xml-tag">&lt;/subsystem&gt;</span>
</code></pre><h4 id="c_Add_usersroles_to_jbpmformbuilderwarWEBINFclasses">c. Add users/roles to jbpm-form-builder.war/WEB-INF/classes/</h4><p>Using your current Archive Manager to add users.properties and roles.properties to jbpm-form-builder.war/WEB-INF/classes/</p><p>d. Make form-builder work with remote guvnor repository, like we did with the Designer</p><p>Configure using the Spring configuration files. Change jbpm-form-builder.war/WEB/INF/<span style="color: #ff6600; font-size: 14pt;">springComponents.xml</span> to GUVNOR_IP:GUVNOR_HTTP_PORT</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-comment">&lt;!-- Guvnor configuration --&gt;</span>
<span class="jive-xml-tag">&lt;bean id="guvnorUrl" class="java.lang.String"&gt;</span>
&#160;&#160; <span class="jive-xml-tag"><span>&lt;constructor-arg type="java.lang.String" value="</span><a class="jive-link-external-small" href="http://GUVNOR_IP:GUVNOR_HTTP_PORT/drools-guvnor" target="_blank">http://GUVNOR_IP:GUVNOR_HTTP_PORT/drools-guvnor</a><span>"/&gt;</span></span>
<span class="jive-xml-tag">&lt;/bean&gt;</span>
</code></pre><p>In our example</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-comment">&lt;!-- Guvnor configuration --&gt;</span>
<span class="jive-xml-tag">&lt;bean id="guvnorUrl" class="java.lang.String"&gt;</span>
&#160;&#160; <span class="jive-xml-tag"><span>&lt;constructor-arg type="java.lang.String" value="</span><a class="jive-link-external-small" href="http://192.168.140.39:8080/drools-guvnor" target="_blank">http://192.168.140.39:8080/drools-guvnor</a><span>"/&gt;</span></span>
<span class="jive-xml-tag">&lt;/bean&gt;</span>
</code></pre><h4 id="d_Deploy_formbuilder_and_verify_like_we_already_did_with_designer">d. Deploy form-builder and verify like we already did with designer</h4><pre class="jive-pre"><code class="jive-code">cp jbpm-form-builder.war standalone/deployments/

# Start GUVNOR_JBOSS
bin/standalone.sh
</code></pre><h4 id="e_Verify_that_you_have">e. Verify that you have</h4><ul><li style="text-align: start;">Verify in your GUVNOR_JBOSS/standalone/logs/server.log</li></ul><pre class="jive-pre"><code class="jive-code">10:36:52,907 INFO&#160; [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "drools-guvnor.war"
</code></pre><ul><li style="text-align: start;"><span>Verify that </span><a class="jive-link-external-small" href="http://GUVNOR_IP:8080/jbpm-form-builder" target="_blank">http://GUVNOR_IP:GUVNOR_HTTP_PORT/jbpm-form-builder</a><span> (</span><a class="jive-link-external-small" href="http://192.168.140.39:8080/jbpm-form-builder" target="_blank">http://192.168.140.39:8080/jbpm-form-builder</a><span>) works.</span></li><li style="text-align: start;"><span>Verify that form-builder and guvnor repository integration works by creating a new "Form Definitions" as in Figure 04.<br/></span></li></ul><p><span><a href="https://community.jboss.org/servlet/JiveServlet/showImage/19305/verify-form-builder.png"><span> https://community.jboss.org/servlet/JiveServlet/downloadImage/19305/verify-form-builder.png </span></a></span></p><p style="text-align: center;"><span>Figure 04: Verify form-builder and guvnor integration<br/></span></p><h2 id="5_TaskService_or_Human_Task_deployment_with_verify">5. Task-Service or Human Task deployment (with verify).</h2><p>Login to server on HUMAN_TASK_IP and place a copy of jbpm-install and start the installation:</p><h3 id="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</h3><pre class="jive-pre"><code class="jive-code"># 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
</code></pre><h3 id="Step_52_Copy_your_custom_build_humantask_">Step 5.2: Copy your custom build human-task </h3><p>From JBPM_SOURCE/jbpm-human-task/jbpm-human-task-war/target </p><p>To $HUMAN_TASK_JBOSS/jbpm-human-task-war.war</p><h3 id="Step_53_Jboss_standalonexml_configuration_">Step 5.3: Jboss standalone.xml configuration </h3><p>Change HUMAN_TASK_JBOSS/standalone/configuration/<span style="color: #ff6600; font-size: 14pt;">standalone.xml</span> as following</p><h4 id="a_Remove_pojo_and_jpa_modules">a. Remove pojo and jpa modules</h4><h5 id="Pojo_extension">Pojo extension</h5><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;extension module="org.jboss.as.osgi"/&gt;</span>
<span class="jive-xml-comment">&lt;!-- Remove this line extension module="org.jboss.as.pojo"/--&gt;</span>
<span class="jive-xml-tag">&lt;extension module="org.jboss.as.remoting"/&gt;</span>
</code></pre><h5 id="And_pojo_domain">And pojo domain</h5><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;subsystem xmlns="urn:jboss:domain:naming:1.0" /&gt;</span>
<span class="jive-xml-comment">&lt;!--subsystem xmlns="urn:jboss:domain:pojo:1.0" /--&gt;</span>
<span class="jive-xml-tag">&lt;subsystem xmlns="urn:jboss:domain:osgi:1.0" activation="lazy"&gt;</span>
</code></pre><h5 id="Jpa_extention">Jpa extention</h5><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;extension module="org.jboss.as.jmx"/&gt;</span>
<span class="jive-xml-comment">&lt;!--extension module="org.jboss.as.jpa"/--&gt;</span>
<span class="jive-xml-tag">&lt;extension module="org.jboss.as.logging"/&gt;</span>
</code></pre><h5 id="_And_jpa_domain"> And jpa domain</h5><pre class="jive-pre"><code class="jive-code jive-xml">&lt;!--subsystem xmlns=<span class="jive-xml-quote">urn:jboss:domain:jpa:1.0</span>&gt;
&#160; <span class="jive-xml-tag">&lt;jpa default-datasource=""/&gt;</span>
<span class="jive-xml-tag">&lt;/subsystem--&gt;</span>
</code></pre><h4 id="b_Change_port_for_management_interface_HUMAN_TASK_MANAGEMENT_PORTs">b. Change port for management interface (HUMAN_TASK_MANAGEMENT_PORTs)</h4><pre ___default_attr="xml" class="jive_text_macro jive_macro_code"><p>&lt;management-interfaces&gt;</p><p>&#160;&#160;&#160; &lt;native-interface interface="management" port="10099" /&gt;</p><p>&#160;&#160;&#160; &lt;http-interface interface="management" port="10090"/&gt;</p><p>&lt;/management-interfaces&gt;</p></pre><h4 id="c_Add_datasource_for_taskservice">c. Add datasource for task-service</h4><pre ___default_attr="xml" class="jive_text_macro jive_macro_code"><p>&lt;subsystem xmlns="urn:jboss:domain:datasources:1.0"&gt;</p><p>&#160;&#160;&#160; &lt;datasources&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;datasource jndi-name="java:jboss/datasources/taskDS" pool-name="MysqlTaskDSPool" enabled="true" jta="true" use-java-context="true" use-ccm="true"&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;connection-url&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jdbc:mysql://192.168.140.39:3306/task</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/connection-url&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;driver&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; mysql</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/driver&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;pool&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;prefill&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; false</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/prefill&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;use-strict-min&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; false</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/use-strict-min&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;flush-strategy&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; FailingConnectionOnly</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/flush-strategy&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/pool&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;security&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;user-name&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; task</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/user-name&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;password&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; taskpassword</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/password&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/security&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/datasource&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;drivers&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;driver name="mysql" module="com.mysql"&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;xa-datasource-class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/xa-datasource-class&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/driver&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/drivers&gt;</p><p>&#160;&#160;&#160; &lt;/datasources&gt;</p><p>&lt;/subsystem&gt;</p></pre><h4 id="d_Bind_to_HUMAN_TASK_IP">d. Bind to HUMAN_TASK_IP</h4><p>In our example</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;interfaces&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;interface name="management"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;inet-address value="${jboss.bind.address.management:192.168.140.39}"/&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/interface&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;interface name="public"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;inet-address value="${jboss.bind.address:192.168.140.39}"/&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/interface&gt;</span>
<span class="jive-xml-tag">&lt;/interfaces&gt;</span>
</code></pre><h4 id="e_Set_offsetport">e. Set offset-port</h4><p>For our example to running on the same server as in <a class="jive-link-wiki-small" href="https://community.jboss.org/docs/DOC-16705">https://community.jboss.org/wiki/MultipleInstancesOfJBossAS7OnTheSameMachine</a> (Approach#1)</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;socket-binding-group name="standard-sockets" default-interface="public" port-offset="100"&gt;</span>
</code></pre><h3 id="Step_54_MySQL_driver_for_jboss">Step 5.4: MySQL driver for jboss</h3><h4 id="a_Create_MySQL_module_directory">a. Create MySQL module directory</h4><pre class="jive-pre"><code class="jive-code">mkdir modules/com/mysql
mkdir modules/com/mysql/main
</code></pre><h4 id="bCopy_module_declaration_file">b.Copy module declaration file</h4><pre class="jive-pre"><code class="jive-code">cp module.xml modules/com/mysql/main/
</code></pre><h4 id="c_Download_and_install_mysql_driver_to_jBoss">c. Download and install mysql driver to jBoss</h4><pre class="jive-pre"><code class="jive-code">wget https://repository.jboss.org/nexus/service/local/repositories/central/content/mysql/mysql-connector-java/5.1.18/mysql-connector-java-5.1.18.jar
cp mysql-connector-java-5.1.18.jar modules/com/mysql/main/mysql-connector-java.jar
</code></pre><h4 id="d_Start_your_HUMAN_TASK_JBOSS_now">d. Start your HUMAN_TASK_JBOSS now</h4><pre class="jive-pre"><code class="jive-code jive-java">bin/standalone.sh
</code></pre><p>To verify your configuration</p><ul><li style="text-align: start;">Does it start Ok?</li><li style="text-align: start;">MySQL driver loaded?</li><li style="text-align: start;"><span>Can you see taskDS datasource on jBoss admin console at </span><a class="jive-link-external-small" href="http://HUMAN_TASK_IP:10099/" target="_blank">http://HUMAN_TASK_IP:HUMAN_TASK_MANAGEMENT_PORT/</a><span><span> (In our example </span><a class="jive-link-external-small" href="http://192.168.140.39:10090/" target="_blank">http://192.168.140.39:10090/</a><span>)?</span></span></li></ul><p style="text-align: center;"><a href="https://community.jboss.org/servlet/JiveServlet/showImage/19269/human_task_jboss.png"><span> https://community.jboss.org/servlet/JiveServlet/downloadImage/19269/human_task_jboss.png </span></a>Figure 05: Veriry DataSource configuration of HUMAN_TASK_JBOSS</p><h3 id="Step_55_jbpmhumantaskwarwar_configuration">Step 5.5: jbpm-human-task-war.war configuration</h3><h4 id="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</h4><p>Remove WEB-INF/lib/netty-3.2.0.Final.jar</p><p>Add jbpm-tm.jar to WEB-INF/lib/</p><h4 id="b_Configure_your_WEBINFwebxml_as_following">b. Configure your WEB-INF/<span style="color: #ff6600; font-size: 14pt;">web.xml</span> as following</h4><h5 id="Make_HornetQ_as_active_transport">Make HornetQ as active transport</h5><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-comment">&lt;!-- active configuration on of hornetq|mina|jms (defauls to hornetq) --&gt;</span>
<span class="jive-xml-tag">&lt;init-param&gt;</span>
&#160;&#160; <span class="jive-xml-tag">&lt;param-name&gt;</span>active.config<span class="jive-xml-tag">&lt;/param-name&gt;</span>
&#160;&#160; <span class="jive-xml-tag">&lt;param-value&gt;</span>hornetq<span class="jive-xml-tag">&lt;/param-value&gt;</span>
<span class="jive-xml-tag">&lt;/init-param&gt;</span>
</code></pre><h5 id="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</h5><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-comment">&lt;!-- HornetQ configuration parameters --&gt;</span>
<span class="jive-xml-tag">&lt;init-param&gt;</span>
&#160;&#160; <span class="jive-xml-tag">&lt;param-name&gt;</span>hornetq.host<span class="jive-xml-tag">&lt;/param-name&gt;</span>
&#160;&#160; <span class="jive-xml-tag">&lt;param-value&gt;</span>192.168.140.39<span class="jive-xml-tag">&lt;/param-value&gt;</span>
<span class="jive-xml-tag">&lt;/init-param&gt;</span>
<span class="jive-xml-tag">&lt;init-param&gt;</span>
&#160;&#160; <span class="jive-xml-tag">&lt;param-name&gt;</span>hornetq.port<span class="jive-xml-tag">&lt;/param-name&gt;</span>
&#160;&#160; <span class="jive-xml-tag">&lt;param-value&gt;</span>1234<span class="jive-xml-tag">&lt;/param-value&gt;</span>
<span class="jive-xml-tag">&lt;/init-param&gt;</span>
</code></pre><h5 id="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</h5><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-comment">&lt;!-- Task Service configuration independent of transport --&gt;</span>
<span class="jive-xml-tag">&lt;init-param&gt;</span>
&#160;&#160; <span class="jive-xml-tag">&lt;param-name&gt;</span>task.persistence.unit<span class="jive-xml-tag">&lt;/param-name&gt;</span>
&#160;&#160; <span class="jive-xml-tag">&lt;param-value&gt;</span>org.jbpm.task<span class="jive-xml-tag">&lt;/param-value&gt;</span>
<span class="jive-xml-tag">&lt;/init-param&gt;</span>
</code></pre><h5 id="User_demo_usergroup_callback_implementation">User demo user/group call-back implementation</h5><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-comment">&lt;!-- use org.jbpm.task.service.DefaultUserGroupCallbackImpl to configure sample user group callback for demo purpose--&gt;</span>
<span class="jive-xml-tag">&lt;init-param&gt;</span>
&#160;&#160; <span class="jive-xml-tag">&lt;param-name&gt;</span>user.group.callback.class<span class="jive-xml-tag">&lt;/param-name&gt;</span>
&#160;&#160; <span class="jive-xml-tag">&lt;param-value&gt;</span>org.jbpm.task.service.DefaultUserGroupCallbackImpl<span class="jive-xml-tag">&lt;/param-value&gt;</span>
<span class="jive-xml-tag">&lt;/init-param&gt;</span>
</code></pre><h5 id="Using_demo_user_and_group_provider">Using demo user and group provider</h5><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-comment">&lt;!-- use classpath:/org/jbpm/task/servlet/SampleUsers.mvel to configure sample users for demo purpose--&gt;
&lt;!-- DefaultUsers.mvel is used to insert Administrator as it is required for task server to operate --&gt;&#160; 
<span class="jive-xml-tag">&lt;init-param&gt;</span>
&#160; <span class="jive-xml-tag">&lt;param-name&gt;</span>load.users<span class="jive-xml-tag">&lt;/param-name&gt;</span>
&#160; <span class="jive-xml-tag">&lt;param-value&gt;</span>classpath:/org/jbpm/task/servlet/SampleUsers.mvel<span class="jive-xml-tag">&lt;/param-value&gt;</span>
<span class="jive-xml-tag">&lt;/init-param&gt;</span>

&lt;!-- use classpath:/org/jbpm/task/servlet/SampleGroups.mvel to configure sample users for demo purpose--&gt;</span>
<span class="jive-xml-tag">&lt;init-param&gt;</span>
&#160; <span class="jive-xml-tag">&lt;param-name&gt;</span>load.groups<span class="jive-xml-tag">&lt;/param-name&gt;</span>
&#160; <span class="jive-xml-tag">&lt;param-value&gt;</span>classpath:/org/jbpm/task/servlet/SampleGroups.mvel<span class="jive-xml-tag">&lt;/param-value&gt;</span>
<span class="jive-xml-tag">&lt;/init-param&gt;</span>
</code></pre><p>Look at attachement for the file <span style="text-decoration: underline;">jbpm_human_task_web.xml</span>, a full copy of our example jbpm-human-task-war/WEB-INF/<span style="color: #ff6600;">web.xml</span></p><h4 id="c_Configure_persistencexml_">c. Configure <span style="color: #ff6600; font-size: 14pt;">persistence.xml</span> </h4><h5 id="Change_jbpmDS_to_taskDS">Change jbpmDS to taskDS</h5><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;non-jta-data-source&gt;</span>java:jboss/datasources/taskDS<span class="jive-xml-tag">&lt;/non-jta-data-source&gt;</span>
</code></pre><h5 id="Modify_properties_to_your_MySQL_IP_and_MySQL_PORT">Modify properties to your MySQL_IP and MySQL_PORT</h5><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.url" value="jdbc:mysql://MySQL_IP:MySQL_PORT/task" /&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.username" value="task"/&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.password" value="taskpassword"/&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.autocommit" value="false" /&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.max_fetch_depth" value="3"/&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.hbm2ddl.auto" value="create" /&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.show_sql" value="true" /&gt;</span>
<span class="jive-xml-tag">&lt;/properties&gt;</span>
</code></pre><p>In our example:</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.url" value="jdbc:mysql://192.168.140.39:3306/task" /&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.username" value="task"/&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.password" value="taskpassword"/&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.autocommit" value="false" /&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.max_fetch_depth" value="3"/&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.hbm2ddl.auto" value="create" /&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.show_sql" value="true" /&gt;</span>
<span class="jive-xml-tag">&lt;/properties&gt;</span>
</code></pre><p>Look at attachment for the file <span style="text-decoration: underline;">jbpm_human_task_persistence.xml</span>, a full copy of our example jbpm-human-task-war/WEB-INF/classes/META-INF/<span style="color: #ff6600;">persistence.xml</span></p><h4 id="d_Update_jpbmhumantaskwarwarWEBINFclassesMETAINFpersistencexml">d. Update jpbm-human-task-war.war/WEB-INF/classes/META-INF/<span style="color: #ff6600;">persistence.xml</span></h4><p>With the modified persistence.xml in the Step c above.</p><h4 id="e_Deploy_formbuilder_and_verify_like_we_already_did_with_designer">e. Deploy form-builder and verify like we already did with designer</h4><pre ___default_attr="plain" class="jive_text_macro jive_macro_code"><p>cp jbpm-human-task-war.war standalone/deployments/</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p># Start HUMAN_TASK_JBOSS again</p><p>bin/standalone.sh</p></pre><h4 id="e_Verify_HumanTask">e. Verify Human-Task</h4><h5 id="Verify_that_you_have_message_like_this">Verify that you have message like this</h5><pre class="jive-pre"><code class="jive-code">18:38:58,305 INFO&#160; [stdout] (MSC service thread 1-2) HornetQ Task service started correctly (update01) !
18:38:58,305 INFO&#160; [stdout] (MSC service thread 1-2) HornetQ Task service running (host 192.168.140.39 port 1234)...
18:38:58,318 INFO&#160; [stdout] (MSC service thread 1-2) -----------Version 5.3.0.Final_Update01-------------
18:38:58,318 INFO&#160; [stdout] (MSC service thread 1-2) Task service startup completed successfully (update01) !
</code></pre><p>I did make a change to Task Service that include "-----------Version 5.3.0.Final_Update01-------------" make sure that our updated version are running.</p><h5 id="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</h5><p style="text-align: center;"><a href="https://community.jboss.org/servlet/JiveServlet/showImage/102-21179-11-19279/verify_human_task_jboss.png"><span> https://community.jboss.org/servlet/JiveServlet/downloadImage/102-21179-11-19279/450-165/verify_human_task_jboss.png </span></a>Figure 06: Verify human-task does listen on HORNETQ_PORT and "Localhost only binding" issues is fixed.</p><pre class="jive-pre"><code class="jive-code">telnet 192.168.140.39 1234
</code></pre><h2 id="6_jBPMConsole_deployment_with_verify">6. jBPM-Console deployment (with verify).</h2><p>Login to server on CONSOLE_IP and place a copy of jbpm-install and start the installation:</p><h3 id="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</h3><pre class="jive-pre"><code class="jive-code"># 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/
</code></pre><h3 id="Step_62_Add_usersroles_configuration_to_CONSOLE_JBOSS">Step 6.2 Add users/roles configuration to CONSOLE_JBOSS</h3><p>cp users.properties standalone/configuration/</p><p>cp roles.properties standalone/configuration/</p><h3 id="Step_63_Copy_your_custom_build_jbpmconsole">Step 6.3: Copy your custom build jbpm-console</h3><p>From JBPM_SOURCE/jbpm-gwt/jbpm-gwt-console/target/jbpm-gwt-console-5.3.0.Final.war</p><p>To $CONSOLE_JBOSS/jbpm-gwt-console.war</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>And from JBPM_SOURCE/jbpm-gwt/jbpm-gwt-console-server/target/jbpm-gwt-console-server-5.3.0.Final.war</p><p>To $CONSOLE_JBOSS/jbpm-gwt-console-server.war</p><h3 id="Step_64_Jboss_standalonexml_configuration">Step 6.4: Jboss standalone.xml configuration</h3><p>Change CONSOLE_JBOSS/standalone/configuration/standalone.xml as following</p><h4 id="a_Remove_pojo_and_jpa_modules_605970">a. Remove pojo and jpa modules</h4><h5 id="Pojo_extension_521132">Pojo extension</h5><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;extension module="org.jboss.as.osgi"/&gt;</span>
<span class="jive-xml-comment">&lt;!-- Remove this line extension module="org.jboss.as.pojo"/--&gt;</span>
<span class="jive-xml-tag">&lt;extension module="org.jboss.as.remoting"/&gt;</span>
</code></pre><h5 id="And_pojo_domain_802756">And pojo domain</h5><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;subsystem xmlns="urn:jboss:domain:naming:1.0" /&gt;</span>
<span class="jive-xml-comment">&lt;!--subsystem xmlns="urn:jboss:domain:pojo:1.0" /--&gt;</span>
<span class="jive-xml-tag">&lt;subsystem xmlns="urn:jboss:domain:osgi:1.0" activation="lazy"&gt;</span>
</code></pre><h5 id="Jpa_extention_672964">Jpa extention</h5><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;extension module="org.jboss.as.jmx"/&gt;</span>
<span class="jive-xml-comment">&lt;!--extension module="org.jboss.as.jpa"/--&gt;</span>
<span class="jive-xml-tag">&lt;extension module="org.jboss.as.logging"/&gt;</span>
</code></pre><h5 id="And_jpa_domain">And jpa domain</h5><pre class="jive-pre"><code class="jive-code jive-xml">&lt;!--subsystem xmlns=<span class="jive-xml-quote">urn:jboss:domain:jpa:1.0</span>&gt;
&#160; <span class="jive-xml-tag">&lt;jpa default-datasource=""/&gt;</span>
<span class="jive-xml-tag">&lt;/subsystem--&gt;</span>
</code></pre><h4 id="b_Change_port_for_management_interface_CONSOLE_MANAGEMENT_PORT">b. Change port for management interface (CONSOLE_MANAGEMENT_PORT)</h4><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;management-interfaces&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;native-interface interface="management" port="10199" /&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;http-interface interface="management" port="10190"/&gt;</span>
<span class="jive-xml-tag">&lt;/management-interfaces&gt;</span>
</code></pre><h4 id="c_Add_datasource">c. Add datasource</h4><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;subsystem xmlns="urn:jboss:domain:datasources:1.0"&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;datasources&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;datasource jndi-name="java:jboss/datasources/jbpmDS" pool-name="MysqlJbpmDSPool" enabled="true" jta="true" use-java-context="true" use-ccm="true"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;connection-url&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jdbc:mysql://192.168.140.39:3306/jbpm
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/connection-url&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;driver&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; mysql
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/driver&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;pool&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;prefill&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; false
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/prefill&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;use-strict-min&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; false
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/use-strict-min&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;flush-strategy&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; FailingConnectionOnly
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/flush-strategy&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/pool&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;security&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;user-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jbpm
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/user-name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;password&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jbpmpassword
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/password&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/security&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/datasource&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;drivers&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;driver name="mysql" module="com.mysql"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;xa-datasource-class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/xa-datasource-class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/driver&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/drivers&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/datasources&gt;</span>
<span class="jive-xml-tag">&lt;/subsystem&gt;</span>
</code></pre><h4 id="d_Add_security_domain_for_jbpmconsole">d. Add security domain for jbpm-console</h4><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;subsystem xmlns="urn:jboss:domain:security:1.0"&gt;</span>
&#160;&#160; <span class="jive-xml-tag">&lt;security-domains&gt;</span>
..
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;security-domain name="jbpm-console" cache-type="default"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;authentication&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;login-module code="UsersRoles" flag="required"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;module-option name="usersProperties" value="${jboss.server.config.dir}/users.properties"/&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;module-option name="rolesProperties" value="${jboss.server.config.dir}/roles.properties"/&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/login-module&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/authentication&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/security-domain&gt;</span>
..
&#160;&#160; <span class="jive-xml-tag">&lt;/security-domains&gt;</span>
<span class="jive-xml-tag">&lt;/subsystem&gt;</span>
</code></pre><h4 id="e_Bind_to_CONSOLE_IP_For_example">e. Bind to CONSOLE_IP. For example</h4><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;interfaces&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;interface name="management"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;inet-address value="${jboss.bind.address.management:192.168.140.39}"/&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/interface&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;interface name="public"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;inet-address value="${jboss.bind.address:192.168.140.39}"/&gt;</span>
&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/interface&gt;</span>
<span class="jive-xml-tag">&lt;/interfaces&gt;</span>
</code></pre><h4 id="f_Set_offsetport">f. Set offset-port</h4><p><span>For our example to running on the same server as in </span><a class="jive-link-wiki-small" href="https://community.jboss.org/docs/DOC-16705" target="_blank">https://community.jboss.org/wiki/MultipleInstancesOfJBossAS7OnTheSameMachine</a><span> (Approach#1)</span></p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;socket-binding-group name="standard-sockets" default-interface="public" port-offset="200"&gt;</span>
</code></pre><h3 id="Step_65_MySQL_driver_for_jboss_identical_with_Step_54">Step 6.5: MySQL driver for jboss (identical with Step 5.4)</h3><h4 id="a_Create_MySQL_module_directory_308940">a. Create MySQL module directory</h4><pre class="jive-pre"><code class="jive-code">mkdir modules/com/mysql
mkdir modules/com/mysql/main
</code></pre><h4 id="bCopy_module_declaration_file_912339">b.Copy module declaration file</h4><pre class="jive-pre"><code class="jive-code">cp module.xml modules/com/mysql/main/
</code></pre><h4 id="c_Download_and_install_mysql_driver_to_jBoss_181750">c. Download and install mysql driver to jBoss</h4><pre class="jive-pre"><code class="jive-code">wget https://repository.jboss.org/nexus/service/local/repositories/central/content/mysql/mysql-connector-java/5.1.18/mysql-connector-java-5.1.18.jar
cp mysql-connector-java-5.1.18.jar modules/com/mysql/main/mysql-connector-java.jar
</code></pre><h4 id="d_Start_your_CONSOLE_JBOSS_now">d. Start your CONSOLE_JBOSS now</h4><pre class="jive-pre"><code class="jive-code">bin/standalone.sh
</code></pre><p style="text-align: start;">To verify your configuration</p><ul><li style="text-align: start;">Does it start Ok?</li><li style="text-align: start;">MySQL driver loaded?</li><li style="text-align: start;"><span>Can you see jbpmDS datasource on jBoss admin console at </span><a class="" href="https://community.jboss.org/CONSOLE_IP:CONSOLE_MANAGEMENT_PORT" target="_blank">http://CONSOLE_IP:CONSOLE_MANAGEMENT_PORT/</a><span> (In our example </span><a class="jive-link-external-small" href="http://192.168.140.39:10190/" target="_blank">http://192.168.140.39:10190/</a><span>)?</span></li></ul><h3 id="Step_66_Gwtconsoleserverwar_configuration">Step 6.6: Gwt-console-server.war configuration</h3><h4 id="a_Add_usersroles_to_gwtconsoleserverwarWEBINFclasses">a. Add users/roles to gwt-console-server.war/WEB-INF/classes/</h4><p>Using your current Archive Manager to add users.properties and roles.properties to gwt-console-server.war/WEB-INF/classes/</p><h4 id="b_Configure_persistencexml">b. Configure persistence.xml</h4><h5 id="Add_mapping_for_ProcessInstanceInfohbmxml">Add mapping for ProcessInstanceInfo.hbm.xml</h5><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;mapping-file&gt;</span>META-INF/ProcessInstanceInfo.hbm.xml<span class="jive-xml-tag">&lt;/mapping-file&gt;</span>
</code></pre><h5 id="Change_to_MySQL_database">Change to MySQL database</h5><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/&gt;</span>
</code></pre><h5 id="Mark_Hibernate_to_show_sql">Mark Hibernate to show_sql</h5><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;property name="hibernate.show_sql" value="true" /&gt;</span>
</code></pre><h5 id="Your_persistencexml_will_look_something_like_this">Your persistence.xml will look something like this</h5><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;</span>
<span class="jive-xml-tag"><span>&lt;persistence version="1.0"
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xsi:schemaLocation="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence" target="_blank">http://java.sun.com/xml/ns/persistence</a><span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" target="_blank">http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd</a><span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/orm" target="_blank">http://java.sun.com/xml/ns/persistence/orm</a><span> 
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" target="_blank">http://java.sun.com/xml/ns/persistence/orm_1_0.xsd</a><span>"
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:orm="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/orm" target="_blank">http://java.sun.com/xml/ns/persistence/orm</a><span>"
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>"
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence" target="_blank">http://java.sun.com/xml/ns/persistence</a><span>"&gt;</span></span>

&#160;&#160;&#160; <span class="jive-xml-tag">&lt;persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;provider&gt;</span>org.hibernate.ejb.HibernatePersistence<span class="jive-xml-tag">&lt;/provider&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;jta-data-source&gt;</span>java:jboss/datasources/jbpmDS<span class="jive-xml-tag">&lt;/jta-data-source&gt;</span>&#160;&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;mapping-file&gt;</span>META-INF/JBPMorm.xml<span class="jive-xml-tag">&lt;/mapping-file&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;mapping-file&gt;</span>META-INF/ProcessInstanceInfo.hbm.xml<span class="jive-xml-tag">&lt;/mapping-file&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.persistence.processinstance.ProcessInstanceInfo<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.drools.persistence.info.SessionInfo<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.drools.persistence.info.WorkItemInfo<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.process.audit.ProcessInstanceLog<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.process.audit.NodeInstanceLog<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.process.audit.VariableInstanceLog<span class="jive-xml-tag">&lt;/class&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.max_fetch_depth" value="3"/&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-comment">&lt;!-- hbm2ddl.auto MUST BE update! The console will otherwise overwrite the schema with each new thread --&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.hbm2ddl.auto" value="update" /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.show_sql" value="true" /&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- for AS7 --&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.transaction.manager_lookup_class" value="org.jbpm.integration.console.JBPMTransactionManager" /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- for AS5 --&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- <span class="jive-xml-tag">&lt;property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" /&gt;</span> --&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/properties&gt;</span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/persistence-unit&gt;</span>

<span class="jive-xml-tag">&lt;/persistence&gt;</span>
</code></pre><h4 id="c_Add_updated_persistencexml_and_ProcessInstanceInfohbmxml_to_gwtconsolerserverwar">c. Add updated persistence.xml and ProcessInstanceInfo.hbm.xml to gwt-consoler-server.war</h4><p>Using your current Archive Manager to add <span style="font-size: 14pt;">persistence.xml</span> and <span style="color: #ff6600; font-size: 14pt;">ProcessInstanceInfo.hbm.xml</span> to gwt-console-server.war/WEB-INF/classes/META-INF/</p><h4 id="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</h4><p><span>As following article </span><a class="jive-link-external-small" href="http://bpmgeek.com/blog/making-jbpm5-work-remote-host" target="_blank">http://bpmgeek.com/blog/making-jbpm5-work-remote-host</a><span> 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</span></p><pre class="jive-pre"><code class="jive-code">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
...
</code></pre><p>In our example</p><pre class="jive-pre"><code class="jive-code jive-java">jbpm.console.server.host=192.168.140.39
jbpm.console.server.port=8280
jbpm.console.server.context=gwt-console-server
&#160;
#configuration properties <font color="navy"><b>for</b></font> task service
#jbpm.console.task.service.strategy=Mina|HornetQ|JMS|Local <font color="navy"><b>default</b></font> 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
&#160;
guvnor.protocol=http
guvnor.host=192.168.140.39:8180
guvnor.subdomain=drools-guvnor
...
</code></pre><h3 id="Step_67_Deployment">Step 6.7: Deployment</h3><pre class="jive-pre"><code class="jive-code">cp jbpm-gwt-console-server.war standalone/deployments/
cp jbpm-gwt-console.war standalone/deployments/
</code></pre><p>And verify that</p><ul><li style="text-align: start;">jbpm-gwt-console-server is deployed</li><li style="text-align: start;">jbpm-gwt-console is deployed</li><li style="text-align: start;"><span>And use your browser to verify that </span><a class="jive-link-external-small" href="http://CONSOLE_IP:8280/jbpm-console" target="_blank">http://CONSOLE_IP:CONSOLE_HTTP_PORT/jbpm-console</a><span> (</span><a class="jive-link-external-small" href="http://192.168.140.39:8280/jbpm-console" target="_blank">http://192.168.140.39:8280/jbpm-console</a><span>) works.</span></li></ul><h2 id="7_Whats_next" style="text-align: start;"><span>7. What's next?</span></h2><h3 id="Upgrading_to_the_Jbossas711Final_works" style="text-align: start;">Upgrading to the Jboss-as-7.1.1.Final works</h3><p style="text-align: start;">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}&#160; to new JBoss and make the change in standalone.xml files.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="text-align: start;">This upgrading has a "Vfs" issue, but we can just ignore it. More here:</p><ul><li style="text-align: start;"><a class="jive-link-message-small" href="https://community.jboss.org/message/753657#753657" target="_blank">https://community.jboss.org/message/753657#753657</a></li><li style="text-align: start;"><a class="" href="https://community.jboss.org/thread/197349?tstart=0" target="_blank">https://community.jboss.org/thread/197349?tstart=0</a></li><li style="text-align: start;"><a class="jive-link-thread-small" href="https://community.jboss.org/thread/197080" target="_blank">https://community.jboss.org/thread/197080</a></li></ul><h3 id="Using_the_Designer230Final_works" style="text-align: start;">Using the Designer-2.3.0.Final works</h3><p>Nothing to say about this upgrades.</p><h3 id="Jbpmconsole_sourcecode_is_a_treasure_for_studying_jBPM_integration">Jbpm-console source-code is a treasure for studying jBPM integration.</h3><p>Just like jbpm-install/build.xml for study jBPM components in one way or another.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Comment by <a href="https://community.jboss.org/docs/DOC-21179">going to Community</a></p>

        <p style="margin: 0;">Create a new document in jBPM at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2034">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>