AnsweredAssumed Answered

Activiti REST war config

Question asked by thysmichels on May 28, 2014
Latest reply on Jan 6, 2016 by seema
I am trying to change the latest activiti-rest.war to not show the demo process but my current processes deployed in activiti-explorer. I have removed the demoDataGenerator bean from my activiti-context.xml but now I getting this error:

{"errorMessage":"couldn't initialize process engine from spring configuration resource file:/usr/local/Cellar/tomcat/7.0.53/libexec/webapps/activiti-rest/WEB-INF/classes/activiti-context.xml: null","statusCode":500}

I have integrated LDAP to my activiti-explorer so when I startup activiti- explorer no processes are deployed. When I deploy a process and refresh my rest endpoint I still see the same error above.

How can I change my rest activiti-context so I can call the same processes deployed in my explorer?Or do I also need to deploy my processes for rest?

Activiti-context:

<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
   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
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">

   <bean id="dbProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
       <property name="locations">
            <list>
                <value>classpath:db.properties</value>
                <value>file:activiti-rest.properties</value>
            </list>
        </property>
      <property name="ignoreUnresolvablePlaceholders" value="true" />
      <property name="ignoreResourceNotFound" value="true" />
   </bean>
   
   <bean id="dataSource"
      class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
      <property name="driverClass" value="${jdbc.driver}" />
      <property name="url" value="${jdbc.url}" />
      <property name="username" value="${jdbc.username}" />
      <property name="password" value="${jdbc.password}" />
   </bean>

   <bean id="transactionManager"
      class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
      <property name="dataSource" ref="dataSource" />
   </bean>

   <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
      <property name="dataSource" ref="dataSource" />
      <property name="transactionManager" ref="transactionManager" />
      <property name="databaseSchemaUpdate" value="true" />
      <property name="mailServerHost" value="localhost" />
      <property name="mailServerPort" value="5025" />
      <property name="jobExecutorActivate" value="true" />
        <property name="customFormTypes">
          <list>
            <bean class="org.activiti.rest.form.UserFormType"/>
            <bean class="org.activiti.rest.form.ProcessDefinitionFormType"/>
            <bean class="org.activiti.rest.form.MonthFormType"/>  
          </list>
        </property>

        <property name="configurators">
          <list>
              <bean class="org.activiti.ldap.LDAPConfigurator">
             
                <!– Server connection params –>
                <property name="server" value="ldap://localhost" />
                <property name="port" value="10389" />
                <property name="user" value="uid=admin,ou=system" />
                <property name="password" value="secret" />
               
                <!– Query params –>
                <property name="baseDn" value="" />
                <property name="queryUserByUserId" value="(&amp;(objectClass=inetOrgPerson)(uid={0}))" />
                <property name="queryUserByFullNameLike" value="(&amp;(objectClass=inetOrgPerson)(|({0}=*{1}*)({2}=*{3}*)))" />
                <property name="queryGroupsForUser" value="(&amp;(objectClass=groupOfUniqueNames)(uniqueMember={0}))" />
               
                <!– Attribute config –>
                <property name="userIdAttribute" value="uid" />
                <property name="userFirstNameAttribute" value="cn" />
                <property name="userLastNameAttribute" value="sn" />
               
                <property name="groupIdAttribute" value="cn" />
                <property name="groupNameAttribute" value="cn" />
               
              </bean>
          </list>
         </property>

   </bean>

   <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
      <property name="processEngineConfiguration" ref="processEngineConfiguration" />
   </bean>

</beans>

Outcomes