Automated archetype upgrage scheme

Hi,

We have a number of custom archetypes that cause issues when upgrading. It make our upgrade process a more specialised operation and one more prone to issues.

I was wondering if a project might be able to created for an "automated archetype upgrade scheme". I.e a way of automating this process and making it part of the upgrade instructions to make it easier for implementers (particularly those new to OVPMS) to preserve and update archetype changes specific to sites during an upgrade.

Thanks,

Adrian

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Automated archetype upgrage scheme

Adrian - I regret to say that I don't think that this is possible. However, since I run in excess of 30 modified archetypes, I can share my technique, which is as follows:

1) Keep a copy of your modified archetypes in one place - this is best as a single folder - ie you do NOT have to duplicate the structure used by OpenVpms. I keep mine in c:\openvpms\current-release\HKG\Archetypes\All (where c:\openvpms\current-release is my <OPENVPMS-HOME> folder - and HKG stands for Hong Kong.

2) when doing an upgrade I use the archdiff utility to compare the archetypes in the new release with those in the previous release. This job is made easier by the fact that at the point I run this, the previous release is in c:\openvpms\current-release-prev and I have an archdifft.bat file sitting in c:\openvpms\current-release\HKG which is as follows:
rem compares standard archetypes in current release with previous
cd ..\bin
call archdiff ..\..\current-release-prev\update\archetypes ..\update\archetypes
pause ...any key to continue

So this gives me a list of archetypes which have changed (or are new or deleted).

I then use this this list to go through my modified archetypes and update any that have changed from the previous release.  Obviously is archetype XXX has been updated but is not one of my modified ones, then I do not have to do anything; ditto if XXX is a new archetype.

If one of my modified ones has been updated then I use a compare utility to look at the changes, and do the necessary changes to my modified version. Depending on the changes I do one oif two things, either may my change to the standard archetype and save it as my modified version, or make the necessary changes to mine to bring it into line with the new version.  The compare utility I use is UltraCompare - not free but I really like it.

From the above, I end up with a set of modified archetypes which are compatible with the new release sitting in c:\openvpms\current-release\HKG\Archetypes\All

I then use my archloadt-ALL.bat (again held in c:\openvpms\current-release\HKG) which is as follows:

@echo off
call ..\bin\setenv.bat
java -Dlog4j.debug -Dlog4j.configuration=file:../conf/log4j.properties org.openvpms.tools.archetype.loader.ArchetypeLoader -s --context ../conf/applicationContext.xml -v -o -m ../update/archetypes/org/openvpms/archetype/assertionTypes.xml -d ../HKG/archetypes/All

 

Bottom line: I cannot see how one could automate the above process further.  It needs a human touch to compare ones modified archetypes with the newly released ones and make the appropriate changes.

Regards, Tim G

 

Syndicate content