Setup external database in Activiti

cancel
Showing results for 
Search instead for 
Did you mean: 
bhchemss
Established Member

Setup external database in Activiti

Jump to solution

Hello everyone,

Please if anyone can help me to setup a MySql database in Activiti to be able to use the data models

The existing tutorial is not helping me.

Thank you

1 Solution

Accepted Solutions
samueel
Active Member

Re: Setup external database in Activiti

Jump to solution

Hi, Chemsseddine Ben Hassine 

You can create a bean in your activiti.cfg.xml like below

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans.xsd">

    <bean id="processEngineConfiguration"
        class="org.activiti.cdi.CdiStandaloneProcessEngineConfiguration">

        <property name="dataSourceJndiName" value="java:jboss/datasources/<name of your datasource>" />
        <property name="jobExecutorActivate" value="false" />
        <property name="history" value="audit" />
        <property name="databaseSchemaUpdate" value="true"></property>
    </bean>

</beans>

View solution in original post

1 Reply
samueel
Active Member

Re: Setup external database in Activiti

Jump to solution

Hi, Chemsseddine Ben Hassine 

You can create a bean in your activiti.cfg.xml like below

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans.xsd">

    <bean id="processEngineConfiguration"
        class="org.activiti.cdi.CdiStandaloneProcessEngineConfiguration">

        <property name="dataSourceJndiName" value="java:jboss/datasources/<name of your datasource>" />
        <property name="jobExecutorActivate" value="false" />
        <property name="history" value="audit" />
        <property name="databaseSchemaUpdate" value="true"></property>
    </bean>

</beans>