Re: [jboss-user] [jBPM] - Human Task Module RoadMap
by gardellajp
gardellajp [https://community.jboss.org/people/gardellajp] commented on the document
"Human Task Module RoadMap"
To view all comments on this document, visit: https://community.jboss.org/docs/DOC-18617#comment-10132
--------------------------------------------------
Hi Mauricio,
Thanks for ask to the community. I have troubles with Human Task Module and generally was because of the lack of documentation, both tutorials or guide an inside the code too. So I vote to improve javadoc would be 9.
Another feature that I like is (I don't know if is relative of HumanTaskModule):
1) Support human task expiration with disposable session, *out of box*: priority 10.
Thanks!
--------------------------------------------------
12 years, 5 months
Re: [jboss-user] [jBPM] - Human Task Module RoadMap
by Mauricio Salatino
Mauricio Salatino [https://community.jboss.org/people/salaboy21] commented on the document
"Human Task Module RoadMap"
To view all comments on this document, visit: https://community.jboss.org/docs/DOC-18617#comment-10131
--------------------------------------------------
Hi Vladimir,
I totally agree with you, as you mention the LocalTaskService is the embed one. That should be working already.
I'm not against that vision, but I also believe that a separate component could also be extremely useful for other scenarios.
Do you have any problem with the Embeded Approach? because it should be working correctly and the transaction mechanisms should be in place.
If you have a known bug please report it to us.
Cheers
--------------------------------------------------
12 years, 5 months
Re: [jboss-user] [jBPM] - Human Task Module RoadMap
by vchmakov
vchmakov [https://community.jboss.org/people/vchmakov] commented on the document
"Human Task Module RoadMap"
To view all comments on this document, visit: https://community.jboss.org/docs/DOC-18617#comment-10130
--------------------------------------------------
I strongly believe that the Human Task engine should be an integral part of the jBPM engine and must participate in transactions started by the engine. When it is not it is really easy for the workflows to end up in ambiguous state should something happen during the process. I know that Mauricio is of a different opinion and the subject was previously discussed here. However, the implementation of the Local Human Task is very much “integrate-able“ (please forgive me for this word) with just a little bit of modifications. In our company we use our own build of the Local Human Task module to achieve the close integration. As soon as the review of the entire Human Task logic has been started may be it is good idea to also review the transaction management inside the Human Task engine so that the integration would be possible “out of the box” without modifications should users (programmers) need it like us. My own priority of this work would be 10 (sorry, but this is very important to us).
Thanks,
Vladimir
--------------------------------------------------
12 years, 5 months
[jBPM] - Human Task Module RoadMap
by Mauricio Salatino
Mauricio Salatino [https://community.jboss.org/people/salaboy21] modified the document:
"Human Task Module RoadMap"
To view the document, visit: https://community.jboss.org/docs/DOC-18617
--------------------------------------------------------------
I've being working with the Human Task module since I've started with my first steps in the jBPM community more than 3 years ago. Now it's time to take this component to the next level.
This wiki page describes the features and improvements that I will be tackling down on the next few months. If you have feedaback about this roadmap please leave a comment here or contact me.
Most of the changes and new features comes from people that is using jBPM or Drools and the Human Task module to handle Human Interactions, so feel free to drop a your suggestions or features that you would like to see in the short term.
I've divided the work into two different sides:
* External Improvements :* Starting from the Local Task Service I will be focused in the following topics* API improvements :Well defined interfaces and factories to interact with the human task functionality. Refactor towards CDI/WELD I will be adding here the proposed changes.
* Documentation & Examples: Documentation about the exposed APIs and about the semantic of each method.
** Transport improvements (probably using apache camel) and integration with different environments (Application Server, Servlet Containers)
* Internal Refactorings* Review Task, TaskData and I18N structures and queries
* Admin Operations and Queries
* Task Events and Queries
* Refactoring for callbacks mechanisms (Task Parent)
* Task Definition Deployment ( (deploy + new instance) instead of add)
* Lifecycle hooks
* Sub Tasks mechanisms
Notice that the External Changes will happen gradually and in parallel with the internal reviews.
*
#Review_Task_TaskData_and_I18N_structures_and_queries Review Task, TaskData and I18N structures and queries
*
#Admin_Operations_and_Queries_Improvements Admin Operations and Queries Improvements
*
#Task_Events_and_Queries Task Events and Queries
*
#Callbacks_Mechanisms_Review Callbacks Mechanisms Review
*
#Task_Definition_Deployment_and_Instantiation_mechanisms Task Definition Deployment and Instantiation mechanisms
*
#LifeCycle_Hooks LifeCycle Hooks
*
#Sub_Tasks_and_Ad_Hoc_Sub_Tasks_Creation Sub Tasks and Ad Hoc Sub Tasks Creation
I've added my personal priority, but feel free to leave a comment if you have another topics or if you feel that one of these bullets needs to be prioritized.
(10 is Top Priority and 1 Low)
h1. Review Task, TaskData and I18N structures and queries
A deep process of documentation and review of the core data structures that are being used by the module will be done. The main focus
of this revision is to improve these structures to be easily accessed and work in the best way possible. The queries associated to these entities
will be reviewed, extended and documented as necessary. Migration scripts should be provided for migrating the old structures to the new ones in case that new structures
modifies core fields.
A detailed documentation about these structures and the generated tables should be provided by this revision.
A categorization about the provided queries should also be included to identify missing bits.
A set of mock task structures and tests for the queries should be provided to guarrantee the expected results.
Update: Based on revisions to the WS-HT specification and the current structures, I've started to belive that including the concept of
TaskDefinition will help us to create a simplier API, a simple deployment and instantiation mechanism and the relationship between the
different pieces of information that are kept.
This will help us to create simple queries on TaskInstances and more straight forward mechanisms.
All the Presentation, Assignment and delegation related fields can be extracted from the task itself and query only when an operation is executed.
For rendering the only information that matters is the one related with each particular task instance. We can avoid the need of querying for all the
other bits of information.
Salaboy Priority: 9
h1. Admin Operations and Queries Improvements
All the administrative operations will be centralized in one place. Removing, archiving and querying finished tasks, and all the associated data.
These operations will include:
* Archive Finished Tasks
* Delete Finished Tasks
* Get all the finished tasks by Process instance
* Get all the finished tasks by Process Definition
* Etc.
Salaboy Priority: 7
h1. Task Events and Queries
Provide a mechanisms to record all the events derived by the Task interactions.
The WS-HT Specification defines 30 events that will be emited by the Human Task component depending on the different interactions against a human task instance.
A mechanism to record and query these events will be implemented.
Salaboy Priority: 7
h1. Callbacks Mechanisms Review
The main focus of this review is to extend and abstract the current methods that are being used for registering callabacks from third party components that wants to
keep track of the tasks' lifecycle.
Having different strategies for setting up callbacks will decouple the responsability for this module to decide how to contact the interested components. Providing
an interface to implement these callbacks in an application dependant way will allow us to describe best practices depending on the third party application requirements.
Salaboy Priority: 6
h1. Task Definition Deployment and Instantiation mechanisms
The WS-HT specification defines to phases to Deploy a task definition and then to create an instance for a specific task definition.
This feature will allow us to have global tasks definitions that can be instantiated multiple times once we get a definition deployed. This mechanism
will give us a fine grained control about who creates a task and how the interactions are done.
Salaboy Priority: 4
h1. LifeCycle Hooks
A flexible mechanism to define and plug your own task lifecycles will be provided, increasing the flexibility of the Human Task module to fit more simpler and more complex scenarios.
Salaboy Priority: 4
h1. Sub Tasks and Ad Hoc Sub Tasks Creation
Having a good and flexible mechanisms for creating sub tasks is a very important feature to have and to show. It will allows us to have new tasks defined on the fly depending on
a parent User Task defined in our business processes.
Salaboy Priority: 6
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-18617]
Create a new document in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
12 years, 5 months
[jBPM] - JBPM 5.3 / Tomcat 7 / H2 / Demo
by smclenahan
smclenahan [https://community.jboss.org/people/smclenahan] modified the document:
"JBPM 5.3 / Tomcat 7 / H2 / Demo"
To view the document, visit: https://community.jboss.org/docs/DOC-18626
--------------------------------------------------------------
The following details how to install jBPM 5.3 onto Tomcat 7, configured to run the provided 'Demo'. A http://www.h2database.com/html/main.html H2 database instance shall be used - which is reflected in the JTA / Hibernate configuration specified below. The following are assumed installed and relatively clean:
* http://tomcat.apache.org/download-70.cgi Tomcat 7.0 (on port 8080)
* http://ant.apache.org/ Ant 1.8.3
* http://ant.apache.org/ivy/ Apache Ivy 2.0
*NB:* Tomcat should be stopped prior to installation.
*0: Download required software:*
http://www.jboss.org/jbpm JBPM : Select http://sourceforge.net/projects/jbpm/files/ 5.3.0 - Final Installer Full
Once downloaded, unzip to a staging area separate from Tomcat - subsequent actions below will take place within the 'jbpm-install' folder.
*1: Pre-Installation Configuration of Tomcat: Prepare for J2EE*
It should be understood that Tomcat is not a J2EE application server - but rather a servlet container.
However - Tomcat can be made to behave like a J2EE application server.
In order to make this so, J2EE components need to be installed and configured on Tomcat.
For JBPM this is an apriori requirement. The steps below shall add the following J2EE services to Tomcat:
* JTA (Java Transaction API)
* Bitronix 2.1.3 Transaction Manager
* JMS
* JACC
*a)* In jbpm-install create folder: tomcat2j2ee \
*b)* In jbpm-install\tomcat2j2ee create the following files:
*ivy.xml*
<ivy-module version="2.0">
<info organisation="jbpm" module="btm" />
<dependencies>
<dependency org="org.codehaus.btm" name="btm-dist" rev="2.1.3" />
<dependency org="org.codehaus.btm" name="btm" rev="2.1.3">
<artifact name="btm" type="jar" />
</dependency>
<dependency org="javax.transaction" name="jta" rev="1.1">
<artifact name="jta" type="jar" />
</dependency>
<dependency org="org.apache.geronimo.specs" name="geronimo-jacc_1.1_spec" rev="1.0.2" >
<artifact name="geronimo-jacc_1.1_spec" type="jar" />
</dependency>
</dependencies>
</ivy-module>
*build.xml*
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="J2EE.install">
<property name="install.home" value="./" />
<property environment="env"/>
<property name="tomcat.home" value="${env.CATALINA_HOME}"/>
<property name="tomcat.7.server.lib.dir" value="${tomcat.home}/lib" />
<!-- ############ TOP LEVEL INSTALLATION ########### -->
<target name="install.j2ee.to.tomcat.7" depends="download.j2ee">
<copy todir="${tomcat.7.server.lib.dir}/">
<fileset dir="${install.home}/lib" includes="*.jar" />
</copy>
</target>
<target name="download.j2ee.check">
<echo message="Checking J2EE Download..." />
<condition property="btm.not.available">
<not>
<available file="${install.home}/lib/btm-2.1.3.jar" />
</not>
</condition>
</target>
<target name="download.j2ee" depends="download.j2ee.check" if="btm.not.available">
<echo message="Getting J2EE..." />
<mkdir dir="${install.home}/lib"/>
<ivy:retrieve />
</target>
</project>
*c)* In jbpm-install\tomcat2j2ee execute:
ant install.j2ee.to.tomcat.7
*d)* Create the following file in ${CATALINA_HOME}\conf
*btm-config.properties*
bitronix.tm.serverId=tomcat-btm-node0
bitronix.tm.journal.disk.logPart1Filename=${btm.root}/work/btm1.tlog
bitronix.tm.journal.disk.logPart2Filename=${btm.root}/work/btm2.tlog
bitronix.tm.resource.configuration=${btm.root}/conf/resources.properties
*NB:* The following option may also be of use for test / dev purposes:
bitronix.tm.2pc.debugZeroResourceTransactions=true
*e)* Add the following parameters to $CATALINA_OPTS - such that they are passed to JVM when Tomcat starts:
-Dbtm.root=${CATALINA_HOME}
-Dbitronix.tm.configuration=${CATALINA_HOME}/conf/btm-config.properties
NB: On windows do this through the configuration tool - do not set environment variable unless you understand the implications.
You will need to specify ${CATALINA_HOME} in full rather than using environment variable.
*You should now have a Tomcat 7 installation with J2EE services required for JBPM present. *
*2: Installation JBPM 5.3 : Pre-Configuration*
The installation process for JBPM 5.3 shall be presented in script form below.
Before that step though it is required to create and perform some initial configuration of both JBPM and Tomcat.
*a)* Configuration of Tomcat
*i)* Reconfigure ${CATALINA_HOME}/server.xml
Add following entries to ${CATALINA_HOME}/server.xml after the server entry for: org.apache.catalina.core.JreMemoryLeakPreventionListener
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="bitronix.tm.integration.tomcat55.BTMLifecycleListener" />
Add the following entries to the section:
<Resource name="jdbc/testDS1" uniqueName="jdbc/testDS1" auth="Container" removeAbandoned="true" factory="bitronix.tm.resource.ResourceObjectFactory" type="javax.sql.DataSource" />
<Resource name="jta/UserTransaction" auth="Container" type="javax.transaction.UserTransaction" factory="bitronix.tm.BitronixUserTransactionObjectFactory" />
<Resource name="TransactionManager" auth="Container" type="javax.transaction.TransactionManager" factory="bitronix.tm.BitronixTransactionManagerObjectFactory" />
<Resource name="TransactionSynchronizationRegistry" auth="Container" type="javax.transaction.TransactionSynchronizationRegistry" factory="bitronix.tm.BitronixTransactionSynchronizationRegistryObjectFactory" />
*ii)* Reconfigure ${CATALINA_HOME}/context.xml
Add the following entries to context.xml after 'WatchedResource':
<Transaction factory="bitronix.tm.BitronixUserTransactionObjectFactory" />
<!-- To make java:comp/env/testDS1 available for reports - via jdbc/testDS1 -->
<ResourceLink global="jdbc/testDS1" name="jdbc/testDS1" type="javax.sql.DataSource" />
<ResourceLink global="jta/UserTransaction" name="UserTransaction" type="javax.transaction.UserTransaction" />
<Transaction factory="bitronix.tm.BitronixTransactionSynchronizationRegistryObjectFactory" jotm.timeout="60"/>
NB: The Birt reporting by default will use Tomcat JNDI to look up resources.
The global resources defined in server.xml in terms of Bitronix JNDI are aliased to Tomcat's JNDI using resourcelink's above.
The hibernate configuration (below...) uses the Bitronix JNDI references
*b)* Configuration of JBPM
*i)* Create the following files in: jbpm-install\db
*resources.properties*
resource.ds1.className=bitronix.tm.resource.jdbc.lrc.LrcXADataSource
resource.ds1.uniqueName=jdbc/testDS1
resource.ds1.minPoolSize=0
resource.ds1.maxPoolSize=5
resource.ds1.driverProperties.driverClassName=org.h2.Driver
resource.ds1.driverProperties.url=jdbc:h2:tcp://localhost/~/test
resource.ds1.driverProperties.user=sa
resource.ds1.driverProperties.password=
resource.ds1.allowLocalTransactions=true
resource.ds1.testQuery=SELECT 1+1
*persistence.xml*
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence
version="1.0"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
http://java.sun.com/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:comp/env/jdbc/testDS1</jta-data-source>
<mapping-file>META-INF/JBPMorm.xml</mapping-file>
<mapping-file>META-INF/ProcessInstanceInfo.hbm.xml</mapping-file>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.jbpm.process.audit.ProcessInstanceLog</class>
<class>org.jbpm.process.audit.NodeInstanceLog</class>
<class>org.jbpm.process.audit.VariableInstanceLog</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
<property name="hibernate.current_session_context_class" value="jta" />
<property name="hibernate.transaction.fatory_class" value="org.hibernate.transaction.JTATransactionFactory" />
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup" />
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider" />
<property name="hibernate.cache.use_second_level_cache" value="false" />
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="false" />
</properties>
</persistence-unit>
</persistence>
*persistence-human-task-service.xml*
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence version="1.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="org.jbpm.task">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<mapping-file>META-INF/Taskorm.xml</mapping-file>
<class>org.jbpm.task.Attachment</class>
<class>org.jbpm.task.Content</class>
<class>org.jbpm.task.BooleanExpression</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Delegation</class>
<class>org.jbpm.task.Escalation</class>
<class>org.jbpm.task.Group</class>
<class>org.jbpm.task.I18NText</class>
<class>org.jbpm.task.Notification</class>
<class>org.jbpm.task.EmailNotification</class>
<class>org.jbpm.task.EmailNotificationHeader</class>
<class>org.jbpm.task.PeopleAssignments</class>
<class>org.jbpm.task.Reassignment</class>
<class>org.jbpm.task.Status</class>
<class>org.jbpm.task.Task</class>
<class>org.jbpm.task.TaskData</class>
<class>org.jbpm.task.SubTasksStrategy</class>
<class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>
<class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>
<class>org.jbpm.task.User</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
<property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
<property name="hibernate.connection.url" value="jdbc:h2:tcp://localhost/~/test" />
<property name="hibernate.connection.username" value="sa"/>
<property name="hibernate.connection.password" value=""/>
<property name="hibernate.connection.autocommit" value="false" />
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup" />
</properties>
</persistence-unit>
</persistence>
*persistence-human-task-war.xml*
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence version="1.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="org.jbpm.task">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<mapping-file>META-INF/Taskorm.xml</mapping-file>
<class>org.jbpm.task.Attachment</class>
<class>org.jbpm.task.Content</class>
<class>org.jbpm.task.BooleanExpression</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Comment</class>
<class>org.jbpm.task.Deadline</class>
<class>org.jbpm.task.Delegation</class>
<class>org.jbpm.task.Escalation</class>
<class>org.jbpm.task.Group</class>
<class>org.jbpm.task.I18NText</class>
<class>org.jbpm.task.Notification</class>
<class>org.jbpm.task.EmailNotification</class>
<class>org.jbpm.task.EmailNotificationHeader</class>
<class>org.jbpm.task.PeopleAssignments</class>
<class>org.jbpm.task.Reassignment</class>
<class>org.jbpm.task.Status</class>
<class>org.jbpm.task.Task</class>
<class>org.jbpm.task.TaskData</class>
<class>org.jbpm.task.SubTasksStrategy</class>
<class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>
<class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>
<class>org.jbpm.task.User</class>
<properties>
<property name="hibernate.jndi.class" value="bitronix.tm.jndi.BitronixInitialContextFactory"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
<property name="hibernate.connection.datasource" value="jdbc/testDS1" />
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup" />
</properties>
</persistence-unit>
</persistence>
*NB:* The above configurations will make use of H2 backend database - data sources are configured through JNDI using Bitronix as initial context.
*ii)* Create the following file in: jbpm-install\conf
*web.humantaskwar.xml*
<web-app>
<display-name>Human Task Service WAR</display-name>
<servlet>
<servlet-name>HumanTaskServiceServlet</servlet-name>
<servlet-class>org.jbpm.task.servlet.HumanTaskServiceServlet</servlet-class>
<!-- Following is a list of initialization parameters that HumanTaskService Servlet accepts
Main controller is active.config parameter that dictates what transport to initialize.
Then there are transport specific parameters that should be filled in only for selected
transport.
Last part provides access to configuring components of task Service itself. All of them
are optional and in case there are not set default values will apply.
-->
<!-- active configuration on of hornetq|mina|jms (defauls to hornetq) -->
<init-param>
<param-name>active.config</param-name>
<param-value>mina</param-value>
</init-param>
<!-- Apache Mina configuration parameters -->
<init-param>
<param-name>mina.host</param-name>
<param-value>localhost</param-value>
</init-param>
<init-param>
<param-name>mina.port</param-name>
<param-value>9123</param-value>
</init-param>
<!-- HornetQ configuration parameters -->
<init-param>
<param-name>hornetq.port</param-name>
<param-value></param-value>
</init-param>
<!-- JMS configuration parameters -->
<init-param>
<param-name>JMSTaskServer.connectionFactory</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>JMSTaskServer.transacted</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>JMSTaskServer.acknowledgeMode</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>JMSTaskServer.queueName</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>JMSTaskServer.responseQueueName</param-name>
<param-value></param-value>
</init-param>
<!-- Task Service configuration independent of transport -->
<init-param>
<param-name>task.persistence.unit</param-name>
<param-value>org.jbpm.task</param-value>
</init-param>
<!-- use org.jbpm.task.service.DefaultUserGroupCallbackImpl to configure sample user group callback for demo purpose-->
<init-param>
<param-name>user.group.callback.class</param-name>
<param-value>org.jbpm.task.service.DefaultUserGroupCallbackImpl</param-value>
</init-param>
<init-param>
<param-name>escalated.deadline.handler.class</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>user.info.class</param-name>
<param-value></param-value>
</init-param>
<!-- allows to specify location of a files that will be used to initially populate task server db -->
<!-- accepts two types of files: MVEL and properties must be suffixed with .mvel and .properties -->
<!-- location of the files can be either on classpath (with prefix classpath:) or valid URL -->
<!-- NOTE: that with custom users files Administrator user must always be present!!! -->
<!-- use classpath:/org/jbpm/task/servlet/SampleUsers.mvel to configure sample users for demo purpose-->
<!-- DefaultUsers.mvel is used to insert Administrator as it is required for task server to operate -->
<init-param>
<param-name>load.users</param-name>
<param-value>classpath:/org/jbpm/task/servlet/DefaultUsers.mvel</param-value>
</init-param>
<!-- use classpath:/org/jbpm/task/servlet/SampleGroups.mvel to configure sample users for demo purpose-->
<init-param>
<param-name>load.groups</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>HumanTaskServiceServlet</servlet-name>
<url-pattern>/HumanTaskServiceServlet/*</url-pattern>
</servlet-mapping>
</web-app>
*Checkpoint: We have at this point installed required J2EE services to Tomcat, configured JNDI datasource components for JPBM on Tomcat and prepared a configuration of JPBM 5.3 to be installed.*
*The next step is to perform the JBPM installation to Tomcat.*
*3: Installation JBPM 5.3*
*a)* Add the following to the end of: jbpm-install\build.properties
# Tomcat Server Version
tomcat.server.version=7
# Database Parameters
# H2
h2.jdbc.driver.version=1.2.124
# Defines MySQL Connect JDBC Driver to Use
mysql.jdbc.driver.version=5.1.20
*b)* Create the following files in jbpm-install:
*ivy.xml*
<ivy-module version="2.0">
<info organisation="jbpm" module="btm" />
<dependencies>
<dependency org="javassist" name="javassist" rev="3.4.GA">
<artifact name="javassist" type="jar" />
</dependency>
<dependency org="org.jboss.weld.servlet" name="weld-servlet" rev="1.1.8.Final">
<artifact name="weld-servlet" type="jar" />
</dependency>
</dependencies>
</ivy-module>
*tomcat7build.xml*
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="jBPM.install">
<property file="build.properties" />
<property name="install.home" value="./" />
<property environment="env"/>
<property name="tomcat.home" value="${env.CATALINA_HOME}"/>
<property name="tomcat.7.server.conf.dir" value="${tomcat.home}/conf" />
<property name="tomcat.7.server.lib.dir" value="${tomcat.home}/lib" />
<property name="tomcat.7.server.deploy.dir" value="${tomcat.home}/webapps" />
<property name="tomcat.bind.address" value="localhost" />
<property name="h2.jdbc.jar" value="h2-${h2.jdbc.driver.version}.jar" />
<property name="h2.download.url" value="http://repo1.maven.org/maven2/com/h2database/h2/${h2.jdbc.driver.version}..."/>
<property name="mysql.jdbc.jar" value="mysql-connector-java-${mysql.jdbc.driver.version}.jar" />
<property name="mysql.download.url" value="http://repo1.maven.org/maven2/mysql/mysql-connector-java/${mysql.jdbc.dri..."/>
<property name="birt.version.as7" value="3_7_0"/>
<property name="birt.download.url.as7" value="http://www.eclipse.org/downloads/download.php?file=/birt/downloads/drops/..."/>
<!-- ############ TOP LEVEL INSTALLATION ########### -->
<target name="install.jbpmfull.to.tomcat.7">
<antcall target="download.dependencies" />
<antcall target="install.bitronix.config.into.tomcat.7" />
<antcall target="install.jBPM.into.tomcat.7" />
<antcall target="install.guvnor.into.tomcat.7" />
<antcall target="install.designer.into.tomcat.7" />
<antcall target="install.form.builder.into.tomcat.7" />
<antcall target="install.ht.war.into.tomcat.7" />
</target>
<target name="start.demo">
<antcall target="install.jBPM.runtime" />
<antcall target="start.human.task" />
</target>
<target name="install.jbpmfull.config.only.to.tomcat.7" >
<antcall target="install.bitronix.config.into.tomcat.7" />
<antcall target="install.gwtconsoleserver.config.into.tomcat.7" />
<antcall target="install.humantaskwar.config.into.tomcat.7" />
</target>
<!-- ############ TOMCAT SUPPORT ########### -->
<target name="check.tomcat.version">
<condition property="tomcat.version.is.7">
<equals arg1="${tomcat.server.version}" arg2="7" />
</condition>
</target>
<!-- ############ DOWNLOAD ############ -->
<!-- Dependencies -->
<target name="download.dependencies">
<echo message="Getting Dependencies ..." />
<mkdir dir="${install.home}/lib"/>
<ivy:retrieve />
</target>
<!-- Databases -->
<!-- Download H2 -->
<target name="download.h2.check">
<echo message="Checking H2 download ..." />
<condition property="h2.not.available">
<not>
<available file="${install.home}/db/driver/${h2.jdbc.jar}" />
</not>
</condition>
</target>
<target name="download.h2" depends="download.h2.check" if="h2.not.available">
<echo message="Getting H2..." />
<mkdir dir="${install.home}/db/driver"/>
<get src="${h2.download.url}" dest="${install.home}/db/driver/${h2.jdbc.jar}" />
</target>
<!-- Download MySQL -->
<target name="download.mysql.check">
<echo message="Checking MySql download..." />
<condition property="mysql.not.available">
<not>
<available file="${install.home}/db/driver/${mysql.jdbc.jar}" />
</not>
</condition>
</target>
<target name="download.mysql" depends="download.mysql.check" if="mysql.not.available">
<echo message="Getting MySql ..." />
<mkdir dir="${install.home}/db/driver"/>
<get src="${mysql.download.url}" dest="${install.home}/db/driver/${mysql.jdbc.jar}" />
</target>
<!-- Download jBPM binaries -->
<target name="download.jBPM.bin.check">
<echo message="Checking jBPM binaries download ..." />
<condition property="jBPM.bin.not.available">
<not>
<available file="${install.home}/lib/jbpm-${jBPM.version}-bin.zip" />
</not>
</condition>
</target>
<target name="download.jBPM.bin" depends="download.jBPM.bin.check" if="jBPM.bin.not.available">
<echo message="Getting jBPM binaries ..." />
<mkdir dir="${install.home}/lib"/>
<get src="${jBPM.url}/jbpm-${jBPM.version}-bin.zip" dest="${install.home}/lib/jbpm-${jBPM.version}-bin.zip" />
</target>
<!-- Download Drools Guvnor -->
<target name="download.drools.guvnor.check">
<echo message="Checking Drools Guvnor download ..." />
<condition property="drools.guvnor.not.available">
<not>
<available file="${install.home}/lib/guvnor-distribution-wars-${drools.guvnor.version}.war" />
</not>
</condition>
</target>
<target name="download.drools.guvnor" depends="download.drools.guvnor.check" if="drools.guvnor.not.available">
<echo message="Getting Drools Guvnor ..." />
<mkdir dir="${install.home}/lib"/>
<get src="${drools.guvnor.url}" dest="${install.home}/lib/guvnor-distribution-wars-${drools.guvnor.version}.war"/>
</target>
<!-- Download Designer -->
<target name="download.designer.check">
<echo message="Checking Designer download ..." />
<condition property="designer.not.available">
<not>
<available file="${install.home}/lib/designer-${designer.version}.war" />
</not>
</condition>
</target>
<target name="download.designer" depends="download.designer.check" if="designer.not.available">
<echo message="Getting Designer ..." />
<mkdir dir="${install.home}/lib"/>
<get src="${designer.url}/designer-${designer.version}.war" dest="${install.home}/lib/designer-${designer.version}.war" />
</target>
<!-- Download form builder -->
<target name="download.form.builder.check">
<echo message="Checking Form Builder download ..." />
<condition property="form.builder.not.available">
<not>
<available file="${install.home}/lib/jbpm-${jBPM.version}-form-builder.war" />
</not>
</condition>
</target>
<target name="download.form.builder" depends="download.form.builder.check" if="form.builder.not.available">
<echo message="Getting Form Builder ..." />
<mkdir dir="${install.home}/lib"/>
<get src="${form.builder.url}" dest="${install.home}/lib/jbpm-${jBPM.version}-form-builder.war" />
</target>
<!-- Download jBPM human task server war -->
<target name="download.jBPM.ht-war.check">
<echo message="Checking jBPM human task war download ..." />
<condition property="jBPM.ht-war.not.available">
<not>
<available file="${install.home}/lib/jbpm-${jBPM.version}-human-task-war.zip" />
</not>
</condition>
</target>
<target name="download.jBPM-ht.war" depends="download.jBPM.ht-war.check" if="jBPM.ht-war.not.available">
<echo message="Getting jBPM human task war ..." />
<mkdir dir="${install.home}/lib"/>
<get src="${jBPM.url}/jbpm-${jBPM.version}-human-task-war.zip" dest="${install.home}/lib/jbpm-${jBPM.version}-human-task-war.zip" />
</target>
<!-- Download jBPM gwt-console -->
<target name="download.jBPM.gwt-console.check">
<echo message="Checking jBPM gwt-console download ..." />
<condition property="jBPM.gwt-console.not.available">
<not>
<available file="${install.home}/lib/jbpm-${jBPM.version}-gwt-console.zip" />
</not>
</condition>
</target>
<target name="download.jBPM.gwt-console" depends="download.jBPM.gwt-console.check" if="jBPM.gwt-console.not.available">
<echo message="Getting jBPM gwt-console ..." />
<mkdir dir="${install.home}/lib"/>
<get src="${jBPM.url}/jbpm-${jBPM.version}-gwt-console.zip" dest="${install.home}/lib/jbpm-${jBPM.version}-gwt-console.zip" />
</target>
<!-- Download BIRT engine for AS7 -->
<target name="check.birt.as7">
<condition property="birt.download">
<equals arg1="${jBPM.birt.download}" arg2="true" />
</condition>
</target>
<target name="download.birt.check.as7" depends="check.birt.as7" if="birt.download">
<echo message="Checking birt reporting engine download for as7 ..." />
<condition property="birt.not.available">
<not>
<available file="${install.home}/lib/birt-runtime-${birt.version.as7}.zip" />
</not>
</condition>
</target>
<target name="download.birt.as7" depends="download.birt.check.as7" if="birt.not.available">
<echo message="Getting birt reporting engine for AS7 ..." />
<mkdir dir="${install.home}/lib"/>
<get src="${birt.download.url.as7}" dest="${install.home}/lib/birt-runtime-${birt.version.as7}.zip" />
</target>
<!-- ############ INSTALL ############ -->
<!-- Install Bitronix -->
<target name="install.bitronix.config.into.tomcat.7">
<copy todir="${tomcat.7.server.conf.dir}"
file="${install.home}/db/resources.properties"
overwrite="true" />
</target>
<!-- Install gtw-console-server config -->
<target name="install.gwtconsoleserver.config.into.tomcat.7">
<copy todir="${tomcat.7.server.deploy.dir}/gwt-console-server/WEB-INF/classes"
file="${install.home}/db/hibernate.cfg.xml"
overwrite="true" />
<copy todir="${tomcat.7.server.deploy.dir}/gwt-console-server/WEB-INF/classes/META-INF"
file="${install.home}/db/persistence.xml"
overwrite="true" />
</target>
<!-- Install human-task-war config -->
<target name="install.humantaskwar.config.into.tomcat.7">
<copy file="${install.home}/conf/web.humantaskwar.xml"
tofile="${tomcat.7.server.deploy.dir}/jbpm-human-task-war/WEB-INF/web.xml"
overwrite="true" />
<copy file="${install.home}/db/persistence-human-task-war.xml"
tofile="${tomcat.7.server.deploy.dir}/jbpm-human-task-war/WEB-INF/classes/persistence.xml"
overwrite="true" />
</target>
<!-- Install JDBC -->
<target name="install.h2.into.tomcat.7" depends="download.h2,check.tomcat.version">
<copy todir="${tomcat.7.server.lib.dir}"
file="${install.home}/db/driver/${h2.jdbc.jar}"
overwrite="true" />
</target>
<target name="install.mysql.into.tomcat.7" depends="download.mysql,check.tomcat.version">
<copy todir="${tomcat.7.server.lib.dir}"
file="${install.home}/db/driver/${mysql.jdbc.jar}"
overwrite="true" />
</target>
<!-- Install guvnor -->
<target name="install.guvnor.into.tomcat.7" depends="download.drools.guvnor,check.tomcat.version">
<mkdir dir="${install.home}/target"/>
<mkdir dir="${install.home}/target/jbpm-drools-guvnor-war"/>
<unzip src="${install.home}/lib/guvnor-distribution-wars-${drools.guvnor.version}.war"
dest="${install.home}/target/jbpm-drools-guvnor-war" />
<!-- Fixes for Tomcat... -->
<delete file="${install.home}/target/jbpm-drools-guvnor-war/WEB-INF/lib/servlet-api-2.5.jar"/>
<copy file="${install.home}/lib/weld-servlet-1.1.8.Final.jar"
tofile="${install.home}/target/jbpm-drools-guvnor-war/WEB-INF/lib/weld-servlet-1.1.8.Final.jar"
overwrite="true" />
<antcall target="removeJavaxServletFromJar" >
<param name="jarpath" value="${install.home}/target/jbpm-drools-guvnor-war/WEB-INF/lib" />
<param name="jarname" value="jboss-servlet-api_3.0_spec-1.0.0.Final.jar" />
</antcall>
<antcall target="removeJavaxServletFromJar" >
<param name="jarpath" value="${install.home}/target/jbpm-drools-guvnor-war/WEB-INF/lib" />
<param name="jarname" value="gwt-user-2.3.0.jar" />
</antcall>
<zip basedir="${install.home}/target/jbpm-drools-guvnor-war"
destfile="${install.home}/target/guvnor-distribution-wars-${drools.guvnor.version}.war" />
<copy file="${install.home}/target/guvnor-distribution-wars-${drools.guvnor.version}.war"
tofile="${tomcat.7.server.deploy.dir}/drools-guvnor.war"
overwrite="true" />
<delete dir="${install.home}/target"/>
</target>
<target name="removeJavaxServletFromJar">
<mkdir dir="${jarpath}/${jarname}.tmp" />
<unzip src="${jarpath}/${jarname}"
dest="${jarpath}/${jarname}.tmp" />
<move file="${jarpath}/${jarname}" toFile="${jarpath}/${jarname}.orig" />
<delete dir="${jarpath}/${jarname}.tmp/javax/servlet" />
<zip basedir="${jarpath}/${jarname}.tmp"
destfile="${jarpath}/${jarname}" />
<delete dir="${jarpath}/${jarname}.tmp" />
</target>
<!-- Install designer -->
<target name="install.designer.into.tomcat.7" depends="download.designer,check.tomcat.version">
<copy file="${install.home}/lib/designer-${designer.version}.war"
tofile="${tomcat.7.server.deploy.dir}/designer.war"
overwrite="true" />
</target>
<!-- Install form builder -->
<target name="install.form.builder.into.tomcat.7" depends="download.form.builder">
<mkdir dir="${install.home}/target"/>
<mkdir dir="${install.home}/target/jbpm-form-builder-war"/>
<unzip src="${install.home}/lib/jbpm-${jBPM.version}-form-builder.war" dest="${install.home}/target/jbpm-form-builder-war" />
<copy file="${install.home}/auth/users.properties"
tofile="${install.home}/target/jbpm-form-builder-war/WEB-INF/classes/users.properties"
overwrite="true" />
<copy file="${install.home}/auth/roles.properties"
tofile="${install.home}/target/jbpm-form-builder-war/WEB-INF/classes/roles.properties"
overwrite="true" />
<copy file="${install.home}/auth/users.properties"
tofile="${jboss.server.conf.dir}/users.properties"
overwrite="true" />
<copy file="${install.home}/auth/roles.properties"
tofile="${jboss.server.conf.dir}/roles.properties"
overwrite="true" />
<zip basedir="${install.home}/target/jbpm-form-builder-war"
destfile="${install.home}/target/jbpm-${jBPM.version}-form-builder.war" />
<copy file="${install.home}/target/jbpm-${jBPM.version}-form-builder.war"
tofile="${tomcat.7.server.deploy.dir}/jbpm-form-builder.war"
overwrite="true" />
<delete dir="${install.home}/target" />
</target>
<!-- Install jbpm human task war -->
<target name="install.ht.war.into.tomcat.7" depends="download.jBPM-ht.war">
<unzip src="${install.home}/lib/jbpm-${jBPM.version}-human-task-war.zip" dest="${install.home}/lib" />
<mkdir dir="${install.home}/target"/>
<mkdir dir="${install.home}/target/jbpm-human-task-war"/>
<unzip src="${install.home}/lib/jbpm-human-task-war-${jBPM.version}.war" dest="${install.home}/target/jbpm-human-task-war" />
<!-- Abstraction for Tomcat Install -->
<copy file="${install.home}/conf/web.humantaskwar.xml"
tofile="${install.home}/task-service/resources/war/web.xml"
overwrite="true" />
<copy file="${install.home}/db/persistence-human-task-war.xml"
tofile="${install.home}/task-service/resources/war/persistence.xml"
overwrite="true" />
<!-- Now Proceed To patch the WAR... -->
<copy file="${install.home}/task-service/resources/war/web.xml"
tofile="${install.home}/target/jbpm-human-task-war/WEB-INF/web.xml"
overwrite="true" />
<copy file="${install.home}/task-service/resources/war/persistence.xml"
tofile="${install.home}/target/jbpm-human-task-war/WEB-INF/classes/META-INF/persistence.xml"
overwrite="true" />
<copy file="${install.home}/jbpm-tm.jar"
tofile="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/jbpm-tm.jar"
overwrite="true" />
<!-- Fix for Tomcat -->
<delete file="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/jta-1.1.jar"/>
<delete file="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/javassist-3.14.0-GA.jar" />
<copy todir="${install.home}/target/jbpm-human-task-war/WEB-INF/lib/"
file="${install.home}/lib/javassist-3.4.GA.jar"
overwrite="true" />
<!-- Rebuild the WAR and deploy -->
<zip basedir="${install.home}/target/jbpm-human-task-war"
destfile="${install.home}/target/jbpm-${jBPM.version}-human-task-war.war" />
<copy file="${install.home}/target/jbpm-${jBPM.version}-human-task-war.war"
tofile="${tomcat.7.server.deploy.dir}/jbpm-human-task-war.war"
overwrite="true" />
<delete dir="${install.home}/target" />
</target>
<!-- Install gwt-console -->
<target name="install.jBPM.into.tomcat.7" depends="download.mysql,download.h2,download.jBPM.gwt-console" >
<antcall target="install.mysql.into.tomcat.7" />
<antcall target="install.h2.into.tomcat.7" />
<mkdir dir="${install.home}/target"/>
<unzip src="${install.home}/lib/jbpm-${jBPM.version}-gwt-console.zip"
dest="${install.home}/target/" />
<antcall target="install.jBPM-gwt-console.into.tomcat.7" />
<antcall target="install.jBPM-gwt-console-server.into.tomcat.7" />
<delete dir="${install.home}/target"/>
</target>
<target name="install.jBPM-gwt-console.into.tomcat.7" depends="check.tomcat.version" if="tomcat.version.is.7">
<!-- gwt-console -->
<unzip src="${install.home}/target/jbpm-gwt-console-${jBPM.version}.war"
dest="${install.home}/target/jbpm-gwt-console-war"/>
<!-- Tomcat Fix -->
<copy todir="${install.home}/target/jbpm-gwt-console-war/WEB-INF/lib"
file="${install.home}/lib/javassist-3.4.GA.jar"
overwrite="true" />
<!-- Repackage WAR and deploy -->
<zip basedir="${install.home}/target/jbpm-gwt-console-war"
destfile="${install.home}/target/jbpm-gwt-console-${jBPM.version}.war"/>
<copy file="${install.home}/target/jbpm-gwt-console-${jBPM.version}.war"
tofile="${tomcat.7.server.deploy.dir}/jbpm-gwt-console.war"
overwrite="true" />
</target>
<!-- Install gwt-console-server -->
<target name="install.jBPM-gwt-console-server.into.tomcat.7" depends="check.tomcat.version" if="tomcat.version.is.7">
<!-- reporting -->
<antcall target="download.birt.as7" />
<!-- gwt-console-server -->
<unzip src="${install.home}/target/jbpm-gwt-console-server-${jBPM.version}.war"
dest="${install.home}/target/jbpm-gwt-console-server-war"/>
<copy file="${install.home}/db/persistence.xml"
tofile="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/classes/META-INF/persistence.xml"
overwrite="true" />
<copy file="${install.home}/db/ProcessInstanceInfo.hbm.xml"
tofile="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/classes/META-INF/ProcessInstanceInfo.hbm.xml"
overwrite="true" />
<copy file="${install.home}/auth/users.properties"
tofile="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/classes/users.properties"
overwrite="true" />
<copy file="${install.home}/auth/roles.properties"
tofile="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/classes/roles.properties"
overwrite="true" />
<copy file="${install.home}/jbpm-tm.jar"
tofile="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/jbpm-tm.jar"
overwrite="true" />
<!-- Fix for conflicting javassist jar -->
<delete file="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/javassist-3.6.0.GA.jar"/>
<delete file="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/javassist-3.14.0-GA.jar" />
<copy todir="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib"
file="${install.home}/lib/javassist-3.4.GA.jar"
overwrite="true" />
<!-- Further fixes for Tomcat... -->
<delete file="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/el-api-1.2.jar"/>
<delete file="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/dom4j-1.6.jar"/>
<!-- Other configuration like work item handlers -->
<!--
<copy todir="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/classes" overwrite="true">
<fileset dir="${install.home}/conf"/>
</copy>
-->
<!-- reporting -->
<antcall target="install.reporting.into.tomcat.7" />
<zip basedir="${install.home}/target/jbpm-gwt-console-server-war"
destfile="${install.home}/target/jbpm-gwt-console-server-${jBPM.version}.war"/>
<copy file="${install.home}/target/jbpm-gwt-console-server-${jBPM.version}.war"
tofile="${tomcat.7.server.deploy.dir}/gwt-console-server.war"
overwrite="true" />
</target>
<!-- Install reporting Tomcat7 -->
<target name="install.reporting.into.tomcat.7" depends="check.birt.as7" if="birt.download" >
<mkdir dir="${install.home}/birt"/>
<unzip src="${install.home}/lib/birt-runtime-${birt.version.as7}.zip"
dest="${install.home}/birt"/>
<copy todir="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib">
<fileset dir="${install.home}/birt/birt-runtime-${birt.version.as7}/ReportEngine/lib">
<include name="**/*.jar"/>
</fileset>
</copy>
<mkdir dir="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/output"/>
<mkdir dir="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/output/image"/>
<mkdir dir="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/reports"/>
<copy file="${install.home}/report/${birt.version.as7}/overall_activity.rptdesign"
tofile="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/reports/overall_activity.rptdesign"
overwrite="true"/>
<delete dir="${install.home}/birt"/>
</target>
<!-- Install Demo -->
<!-- create runtime -->
<target name="install.jBPM.runtime" depends="download.jBPM.bin">
<mkdir dir="${install.home}/runtime"/>
<unzip src="${install.home}/lib/jbpm-${jBPM.version}-bin.zip" dest="${install.home}/runtime" />
</target>
<path id="classpath.human.task">
<fileset dir="${install.home}/runtime" includes="**/*.jar"/>
<fileset dir="${install.home}/db/driver" includes="**/*.jar"/>
</path>
<target name="start.human.task">
<mkdir dir="${install.home}/task-service/target"/>
<javac includeantruntime="false" srcdir="${install.home}/task-service/src" destdir="${install.home}/task-service/target" classpathref="classpath.human.task">
<compilerarg value="-Xlint:unchecked"/>
</javac>
<copy tofile="${install.home}/task-service/resources/META-INF/persistence.xml"
file="${install.home}/db/persistence-human-task-service.xml"
overwrite="true" />
<copy todir="${install.home}/task-service/target">
<fileset dir="${install.home}/task-service/resources"/>
</copy>
<java classname="org.jbpm.DemoTaskService" fork="true">
<classpath>
<pathelement path="${install.home}/task-service/target"/>
<path refid="classpath.human.task" />
</classpath>
</java>
</target>
</project>
*c)* Perform the installation: In jbpm-install execute:
ant -buildfile tomcat7build.xml install.jbpmfull.to.tomcat.7
*d)* Add the following parameters to $CATALINA_OPTS and passed to JVM when Tomcat started:
-Xms256m
-Xmx1024m
-XX:PermSize=128m
-XX:MaxPermSize=256m
-Dreporting.needcontext=true
*NB:* On windows do this through the configuration tool - do not set environment variable unless you understand the implications.
*Checkpoint: We have at this point installed JBPM 5.3 to Tomcat.*
*Before proceeding to run the 'demo' below it should be noted that there is an error in the 5.3 FINAL distribution which prevents the console from running whilst drools-guvnor is running. In order to see the demo cleanly - stop drools-guvnor. *
*In the above configuration - reporting will work - however - see here for implications of moving away from H2 backend, and http://ironclaws.wordpress.com/2012/06/23/jbpm-reporting-birt-tomcat-7-pu... here if you want to configure the report engines initial JNDI context.*
*4: Running the Demo*
*a)* Update report definition: ${CATALINA_HOME}/webapps/gwt-console-server/WEB-INF/reports/overall_activity.rptdesign
Add following to 'oda-data-source' section:
<property name="odaJndiName">java:comp/env/jdbc/testDS1</property>
*b)* Add following to Tomcat startup parameter:
-Djbpm.console.directory=\sample\evaluation\src\main\resources
*c)* Reconfigure ${CATALINA_HOME}/tomcat-users.xml, add:
<role rolename="manager" />
<role rolename="admin" />
<role rolename="user" />
<role rolename="PM" />
<role rolename="HR" />
<role rolename="webdesigner" />
<role rolename="functionalanalyst" />
<role rolename="sales" />
<user username="krisv" password="krisv" roles="manager,admin,user" />
<user username="john" password="john" roles="admin,manager,user,PM" />
<user username="mary" password="mary" roles="admin,manager,user,HR" />
<user username="sales-rep" password="sales-rep" roles="admin,manager,user,sales" />
<user username="admin" password="admin" roles="admin,manager,user,webdesigner,functionalanalyst" />
*e)* Start H2: In jbpm-install execute:
ant start.h2
*f)* Start Tomcat
*g)* Stop drools-guvnor and restart gwt-console-server (to be on the safe side)
*h)* Naviate to: http://localhost:8080/jbpm-gwt-console http://localhost:8080/jbpm-gwt-console
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-18626]
Create a new document in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
12 years, 5 months
[jBPM] - How to use jar files in guvnor?
by xealous
xealous [https://community.jboss.org/people/xealous] created the discussion
"How to use jar files in guvnor?"
To view the discussion, visit: https://community.jboss.org/message/743961#743961
--------------------------------------------------------------
Hi everyone,
I've been searching for days and still couldn't find good tutorials on jbpm5. I have a hard time using external jars in my project. Any help is appreciated :)
Here are the steps I took;
I have a CreateProject.jar file that I need to use with my process so that I can write stuff to the database via a web service.
I have com.deneme.CreateProject class in it that I import and use in my script task.
I've uploaded it as POJO model jar
Package validation and build is successful but I don't see my process in jbpm-console and jboss server log has the following:
> 15:08:21,612 ERROR [stderr] (Thread-43) java.lang.RuntimeException: KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage
> 15:08:21,612 ERROR [stderr] (Thread-43) at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:776)
> 15:08:21,612 ERROR [stderr] (Thread-43) at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:706)
> 15:08:21,612 ERROR [stderr] (Thread-43) at org.drools.agent.impl.KnowledgeAgentImpl.incrementalBuildResources(KnowledgeAgentImpl.java:892)
> 15:08:21,612 ERROR [stderr] (Thread-43) at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:675)
> 15:08:21,612 ERROR [stderr] (Thread-43) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:203)
> 15:08:21,612 ERROR [stderr] (Thread-43) at org.drools.agent.impl.KnowledgeAgentImpl$ChangeSetNotificationDetector.run(KnowledgeAgentImpl.java:1270)
> 15:08:21,612 ERROR [stderr] (Thread-43) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> 15:08:21,613 ERROR [stderr] (Thread-43) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> 15:08:21,613 ERROR [stderr] (Thread-43) at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> 15:08:21,613 ERROR [stderr] (Thread-43) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> 15:08:21,613 ERROR [stderr] (Thread-43) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> 15:08:21,613 ERROR [stderr] (Thread-43) at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> 15:08:21,613 ERROR [stderr] (Thread-43) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 15:08:21,613 ERROR [stderr] (Thread-43) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 15:08:21,613 ERROR [stderr] (Thread-43) at java.lang.Thread.run(Thread.java:662)
> 15:08:21,614 ERROR [stderr] (Thread-43) Caused by: java.lang.ClassNotFoundException: com.deneme.CreateProject from [Module "deployment.jbpm-gwt-console-server.war:main" from Service Module Loader]
> 15:08:21,614 ERROR [stderr] (Thread-43) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
> 15:08:21,614 ERROR [stderr] (Thread-43) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)
> 15:08:21,614 ERROR [stderr] (Thread-43) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333)
> 15:08:21,614 ERROR [stderr] (Thread-43) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)
> 15:08:21,614 ERROR [stderr] (Thread-43) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
> 15:08:21,614 ERROR [stderr] (Thread-43) at java.lang.Class.forName0(Native Method)
> 15:08:21,614 ERROR [stderr] (Thread-43) at java.lang.Class.forName(Class.java:247)
> 15:08:21,615 ERROR [stderr] (Thread-43) at org.drools.common.DroolsObjectInputStream.resolveClass(DroolsObjectInputStream.java:85)
> 15:08:21,615 ERROR [stderr] (Thread-43) at org.drools.common.DroolsObjectInputStream.resolveClass(DroolsObjectInputStream.java:97)
> 15:08:21,615 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1574)
> 15:08:21,615 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
> 15:08:21,615 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readClass(ObjectInputStream.java:1461)
> 15:08:21,615 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1311)
> 15:08:21,615 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
> 15:08:21,615 ERROR [stderr] (Thread-43) at java.util.HashMap.readObject(HashMap.java:1030)
> 15:08:21,616 ERROR [stderr] (Thread-43) at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
> 15:08:21,616 ERROR [stderr] (Thread-43) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 15:08:21,616 ERROR [stderr] (Thread-43) at java.lang.reflect.Method.invoke(Method.java:597)
> 15:08:21,616 ERROR [stderr] (Thread-43) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969)
> 15:08:21,616 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
> 15:08:21,616 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
> 15:08:21,616 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
> 15:08:21,616 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
> 15:08:21,616 ERROR [stderr] (Thread-43) at org.drools.rule.MVELDialectRuntimeData.readExternal(MVELDialectRuntimeData.java:85)
> 15:08:21,617 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1791)
> 15:08:21,617 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
> 15:08:21,617 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
> 15:08:21,617 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
> 15:08:21,617 ERROR [stderr] (Thread-43) at java.util.HashMap.readObject(HashMap.java:1030)
> 15:08:21,617 ERROR [stderr] (Thread-43) at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
> 15:08:21,617 ERROR [stderr] (Thread-43) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 15:08:21,617 ERROR [stderr] (Thread-43) at java.lang.reflect.Method.invoke(Method.java:597)
> 15:08:21,617 ERROR [stderr] (Thread-43) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969)
> 15:08:21,618 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
> 15:08:21,618 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
> 15:08:21,618 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
> 15:08:21,618 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
> 15:08:21,618 ERROR [stderr] (Thread-43) at org.drools.rule.DialectRuntimeRegistry.readExternal(DialectRuntimeRegistry.java:59)
> 15:08:21,618 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1791)
> 15:08:21,618 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
> 15:08:21,618 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
> 15:08:21,619 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
> 15:08:21,619 ERROR [stderr] (Thread-43) at org.drools.rule.Package.readExternal(Package.java:208)
> 15:08:21,619 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1791)
> 15:08:21,619 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
> 15:08:21,619 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
> 15:08:21,619 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666)
> 15:08:21,619 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322)
> 15:08:21,619 ERROR [stderr] (Thread-43) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
> 15:08:21,619 ERROR [stderr] (Thread-43) at org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:205)
> 15:08:21,620 ERROR [stderr] (Thread-43) at org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:174)
> 15:08:21,620 ERROR [stderr] (Thread-43) at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:749)
> 15:08:21,620 ERROR [stderr] (Thread-43) ... 14 more
Moreover, is using script task is fine or should I use another approach?
Thanks in advence
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/743961#743961]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months