cancel
Showing results for 
Search instead for 
Did you mean: 

[Resolved] How to update Activiti?

oliverweidel
Champ in-the-making
Champ in-the-making
Hello,

Im new in Activiti and I have to evaluate this BPM-Tool. Activiti 5.4 itselfs works very well.

But I need one answer of a simple question I havent found in the user guide: How do I update Activiti for example from version 5.4 to 5.5. Its also possible to update directly from version 5.4 to 5.6 or do I have to install version 5.5 first?

Thank you very much!

Regards, Oliver
6 REPLIES 6

frederikherema1
Star Contributor
Star Contributor
There is an update-mechanism built-in that performs the db-upgrade from the 5.4 to 5.6 when the updateSchema property is set to "true" in your configuration.

So yes, it's possible to upgrade an existing activiti system.

oliverweidel
Champ in-the-making
Champ in-the-making
Hello and thank you for your answer!

Unfortunately I still dont know how to update. I have an Activiti 5.4 installation with some designed business processes and new users in the h2 database. When I've downloaded version 5.6, what I have to do to update to this version? In other BPM-Tools updates provided by an executable file. Do I use ant to install the update?

Thanks for any reply!

Regards, Oliver

frederikherema1
Star Contributor
Star Contributor
If you use the activiti as a library, just update the jar-file. If you are using explorer, just use the new version and point it to the 5.4 database. the first time it strarts, it will update the schema and your activiti will be updated..

oliverweidel
Champ in-the-making
Champ in-the-making
Hello Frederik and thanks again for your answer!
…just use the new version and point it to the 5.4 database. the first time it strarts, it will update the schema and your activiti will be updated..
Due to the user guide - in "activiti-5.6\setup\files\cfg.activiti\standalone\activiti.cfg.xml" is written by default:
  <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
 
    <!– Database configurations –>
    <property name="databaseSchemaUpdate" value="true" />
    <property name="jdbcUrl" value="@jdbc.url@" />
    <property name="jdbcDriver" value="@jdbc.driver@" />
    <property name="jdbcUsername" value="@jdbc.username@" />
    <property name="jdbcPassword" value="@jdbc.password@" />
   
    <property name="jobExecutorActivate" value="true" />

    <property name="dbCycleUsed" value="true" />
   
  </bean>
It means, that the property is set to true so it should update the H2 database. In "activiti-5.6\setup\build.xml" are some entries in reference to H2 databse settings but nothing where I can point to the old Activiti 5.4 H2 database.
  <target name="demo.start"
          description="Starts the demo setup and installs things if necessary"
          depends="demo.install,
                   h2.start,
                   tomcat.start,
                   explorer.browser.open" />

  <available property="demo.is.installed" file="${activiti.home}/apps"/>
 
  <target name="demo.install"
          description="Installs tomcat and h2 database, deploys webapps, creates the db schema and deploys example processes"
          unless="demo.is.installed">
    <echo message="installing demo" />
    <antcall target="build.webapps" />
    <antcall target="h2.install" />
    <antcall target="h2.start" />
    <antcall target="db.create" />
    <antcall target="db.demo.data" />
    <antcall target="h2.stop" />
    <antcall target="tomcat.install" />
    <antcall target="deploy.activiti.cfg.into.tomcat" />
    <antcall target="deploy.activiti.webapps.into.tomcat" />
  </target>
  <condition property="h2.not.installed">
    <and>
      <equals arg1="${db.is.h2}" arg2="true" />
      <not><available file="${activiti.home}/apps/h2"/></not>
    </and>
  </condition>
 
  <condition property="db.install.supported">
    <equals arg1="${db}" arg2="h2" />
  </condition>

<target name="h2.install"
          description="Installs the H2 db in the ${activiti.home}/apps/h2 directory"
         depends="internal.db.install.h2, internal.db.install.h2.unnecessary, internal.db.install.unsupported" />

<target name="internal.db.install.h2"
          if="h2.not.installed">
  <echo message="Installing H2 adtabase in ${activiti.home}/apps/h2" />
    <mkdir dir="${activiti.home}/apps/h2" />
    <copy todir="${activiti.home}/apps/h2">
      <fileset dir="${activiti.home}/setup/files/dependencies/libs">
        <include name="h2*.jar"/>
      </fileset>
      <fileset dir="files/h2" />
    </copy>
    <chmod perm="a+x">
      <fileset dir="${activiti.home}/apps/h2">
        <include name="*.sh"/>
      </fileset>
    </chmod>
  </target>

  <target name="internal.db.install.h2.unnecessary"
         unless="h2.not.installed">
   <echo message="H2 is already installed" />
  </target>
"H2 is already installed" - thats my target…  Smiley Happy

I wonder if you can show me the right way? Thanks again..

frederikherema1
Star Contributor
Star Contributor
I see, you're using the demo-setup and it's default H2 database. Problem is that the H2 data-files are stored on disk, in your 5.4 distribution. So the easiest will be to copy the H2 folder (from /apps/) to the 5.6 distro, this way the database will be the one from your 5.4, when H2 starts.

oliverweidel
Champ in-the-making
Champ in-the-making
Hallo and sorry for my late reply.

Correct, at the moment we are using the demo-setup.

After I had downloaded Activiti 5.6 I have copied it into the Activiti directory:

C:\activiti\…
| - activiti-5.4
| - activiti-5.6
| - downloads
| - \ activiti-modeler-5.4.war
| - \ apache-tomcat-6.0.32.zip
| - …
The files into the folder downloads have been downloaded automatically during the Activiti 5.4 setup.

And this was the problem. The setup script found the already present download folder and havent completed the setup proberly. After I had changed the name of the download folder into e. g. downlaods-5.4 the Activiti 5.6 demo setup works very well.

Thank you very much for your help!

Kind regards,
Oliver