cancel
Showing results for 
Search instead for 
Did you mean: 

activiti.cfg.xml for custom usermanagement

kethur
Champ in-the-making
Champ in-the-making
Hi Team,

I am trying to use the below params in my activiti.cfg.xml.  But, I am not sure where to place this file.  I tried one option and it worked for me but i am not sure, if that is the right way to do. 

I kept my activiti.cfg.xml under XX\apache-tomcat-6.0.32\webapps\activiti-rest\WEB-INF\classes
and removed existing activiti-context.xml file then it worked.

I had gone through various posts but nothing actually worked for me other than the above method. Could you please explain what actually happens with activiti.cfg.xml and which is the correct steps to make this working?

My activiti.cfg.xml contains… 
….
<bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
      <property name="databaseSchemaUpdate" value="true" />
      <property name="history" value="audit" />

      <property name="customSessionFactories">
         <list>
            <bean
               class="com.unisys.activiti.prototype.identityservice.MyUserManagerFactory">
               <constructor-arg ref="MyConnectionParams" />
            </bean>
            <bean
               class="com.unisys.activiti.prototype.identityservice.MyGroupManagerFactory">
               <constructor-arg ref="MyConnectionParams" />
            </bean>
         </list>
      </property>
   </bean>
…..
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
The activiti config file needs to be on the classpath. So the regular rules around Java classpath apply.
That is the reason why storing it under WEB-INF  works: that is where you place your libraries in a regular Java web application.
Alternatively, you can make a jar of the config file, put it in WEB-INF or in the shared lib folder of tomcat.