cancel
Showing results for 
Search instead for 
Did you mean: 

Autodeployment with Spring - Issue

jenniferritz
Champ in-the-making
Champ in-the-making
I am having difficulty deploying with Activiti-Spring auto deployment in our dev environment.   We have multiple developers (each with their own workspace location) and each time any one of them starts their local WAS Server, Activiti auto-deploys the code in their view even if their view does not have the most recent changes, and the most recent changes have been deployed from another workspace.  I believe this is due to the fact that Activiti-Spring is putting the full path to the .bpmn file in the ACT_GE_BYTEARRAY table.  Is there a way to configure this to use a relative path to populate ACT_GE_BYTEARRAY, so we dont get the old models from individuals dev environments ?

   <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
            …
            <property name="deploymentName" value="x270Processes" />
              <property name="deploymentResources" >
                    <list>
              <value>classpath*:/com/pnc/tsc/hca/activiti/resources/FileInbound270.bpmn</value>
              <value>classpath*:/com/pnc/tsc/hca/activiti/resources/GoodTransactionsInbound270.bpmn</value>
        </list>      
              </property>    
   </bean>

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

jenniferritz
Champ in-the-making
Champ in-the-making
Just realized the configuration did not render due to the tags. 

<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
                           …
           <property name="deploymentName" value="x270Processes" />
              <property name="deploymentResources" >
     <list>
           <value>classpath*:/com/pnc/tsc/hca/activiti/resources/FileInbound270.bpmn</value>
           <value>classpath*:/com/pnc/tsc/hca/activiti/resources/GoodTransactionsInbound270.bpmn</value>
    </list> 
         </property> 
</bean>

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

jbarrez
Star Contributor
Star Contributor
The auto deploy feature actually compares the bytes (ie the content) of the bpmn files, and only deploys if there was a change.

So you mean all the local instances go to the same database?
If so, I don't think Activiti has anything out of the box to solve this. You'll need to write your own logic that will deploy the process when the spring container has booted to work around it.