cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic resource deployment?

bluerain
Champ in-the-making
Champ in-the-making
I am trying to implement the automatic resource deployment feature provided by spring.

<property name="deploymentResources" value="classpath*:/diagrams/*.bpmn20.xml"/>

but it seems to be not doing what it suppose to do.
Everytime I have to login into probe and do the deployment of the bar file.
Any pointers to get this working?
8 REPLIES 8

frederikherema1
Star Contributor
Star Contributor
Are you using the default demo install? The rest-webapp doesn't use spring-way of configuring engine. In other words, the deploymentResources will only work of the process-engine is created using the ProcessEngineFactoryBean.

bluerain
Champ in-the-making
Champ in-the-making
No I am not using the default demo install.
I am using the spring way of configuring the Process engine. Here is how i am doing it:

   <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="databaseType" value="h2"/>
        <property name="dataSource" ref="dataSource"/>
        <property name="transactionManager" ref="transactionManager"/>
<property name="databaseSchemaUpdate" value="true"/>
        <property name="jobExecutorActivate" value="false"/>
        <property name="deploymentResources" value="classpath*:/diagrams/*.bpmn20.xml"/>
   </bean>

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

frederikherema1
Star Contributor
Star Contributor
You are sure the bpmn20.xml resources are actually on your classpath in the folder "diagrams"? -> where do you put them in your tomcat?

unsavory
Champ on-the-rise
Champ on-the-rise
I am having the exact same issue. 

<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="jobExecutorActivate" value="true" />
  <property name="deploymentResources" value="classpath*:/seah/bpm/*.bpmn20.xml" />
</bean>

It deployed the first time, but is no longer deploying when I restart tomcat.  I have verified the file is located at:  /WEB-INF/classes/seah/bpm/Qualification.bpmn20.xml

unsavory
Champ on-the-rise
Champ on-the-rise
It gets even stranger.  I found that if I modify my spring applicationContext.xml file by adding a space in it somewhere and then save it and redeploy, Activiti will then do auto-deploy on the resource.

jbarrez
Star Contributor
Star Contributor
That sounds very bizarre. Are you sure the appcontext isnt cached anywhere on your server? Cause thats the only thing I can think of.

unsavory
Champ on-the-rise
Champ on-the-rise
Yes, I'm positive.

jbarrez
Star Contributor
Star Contributor
It would help tremendously if you could show the problem using a unit test.
I tried do emulate it, by closing and recreating the appliction context, but all works fine.