Red Hat Training
A Red Hat training course is available for JBoss Enterprise SOA Platform
7.6. Configuring the JBPM
The configuration settings for the JBoss Business Process Manager are stored in three files within the
SOA_ROOT/jboss-as/server/PROFILE/deploy/jbpm.esb/
directory:
jbpm.cfg.xml
hibernate.cfg.xml
jbpm.mail.templates.xml
- The
jbpm.cfg.xml
file is set to tell the JBPM to use the JTA Transaction Manager:<service name="persistence"> <factory> <bean class="org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory"> <property name="isTransactionEnabled"><false/></property> <property name="isCurrentSessionEnabled"><true/></property> <!--property name="sessionFactoryJndiName"> <string value="java:/myHibSessFactJndiName" /> </property--> </bean> </factory> </service>
- The
hibernate.cfg.xml
file also tells the JBPM use theJTA Transaction Manager
:<!-- JTA transaction properties (begin) --> <property name="jta.UserTransaction">UserTransaction</property> <property name="hibernate.current_session_context_class">jta</property> <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property> <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property> <!-- JTA transaction properties (end) -->
Note
Do not use Hibernate to create the database schema. Use theDatabaseInitializer
MBean instead. - The
jbpm.mail.templates.xml
file contains the following:jboss-as ]$ cat server/default/deploy/jbpm.esb/jbpm.mail.templates.xml <?xml version="1.0" encoding="UTF-8"?> <mail-templates> <variable name="taskListBaseURL" value="http://localhost:8080/jbpm-console/app/task.jsf?id=" /> <mail-template name='task-assign'> <actors>${taskInstance.actorId}</actors> <subject>Task notification: ${taskInstance.name}</subject> <text><![CDATA[Hi ${taskInstance.actorId}, Task '${taskInstance.name}' has been assigned to you. Go for it: ${taskListBaseURL}${taskInstance.id} Sent by jBPM]]></text> </mail-template> <mail-template name='task-reminder'> <actors>${taskInstance.actorId}</actors> <subject>Task reminder: ${taskInstance.name}</subject> <text><![CDATA[Hey ${taskInstance.actorId}, Do not forget about task '${taskInstance.name}'. Get going: ${taskListBaseURL}${taskInstance.id} Sent by jBPM]]></text> </mail-template> </mail-templates>
Note
To learn more about each of these configuration files, refer to the JBPM Reference Guide.