Identifying Modified archetypes on OpenVPMS systems
Submitted by Ben_Charlton on Wed, 20/04/2016 - 16:57
There has recently been lots of changes in the implementation field...ie people have left and others are doing more work.
I am finding that lots of the reported errors all focus on custom archetypes.
Can I suggest we consider reviewing the way we record archetypes in the database and in particular how custom archetypes are recorded.
Perhaps has part of the upgrade process checking for archetypes that are different would be a good / required part of the process.
We should probably add this as part of the notes somewhere or atleast provide a upgrade_check script that can do it all and provide a summary.
I know we are considering adding a database upgrade pathway that checks db versions perhaps this could add into that project.
Re: Identifying Modified archetypes on OpenVPMS systems
The standard archetypes are included in openvpms-archetypes.jar and openvpms-sms.jar so it would be possible to enhance archdiff to support comparing those with what is in the database.
The upgrade process would include a step to run archdiff to identify those archetypes that have changed or have been added.
This would help users to re-apply their customisations after running the upgrade.
Re: Identifying Modified archetypes on OpenVPMS systems
I must admit that I functionally do this. I hold all our modified archetypes in one folder. My upgrade.bat runs the standard archload, then pauses for me to run archdiff to compare the (new) current archetypes with the previous ones - thus giving a list of which archetypes been updated in the new release. I then check this list against my set of modified ones, and for all that have been updated I use a differencing editor to compare my modified ones with the new standard versions and do any required updates. I then continue the update.bat and it runs archload to load my modified ones.
Note that even with an archdiff that can find which of the loaded archetypes are non-standard, there may be a bit of a problem figuring out how to apply the customisation to the new archetypes - simply because the nice compact .adl format differs from the exported xml.
I am certain although a 'tell me which archetypes I am using that are customised' tool would be useful, it is not the complete answer. One really does need to mantain a set of customised adl files.
Regards, Tim G