How do I test application upgrade? What are the steps to introduce upgrades in an APS package?
Building a new version of a package
- if you change schema for a resource it's needed to increment its id, here is a rule of thumb:
Adding property/relation: increase minor version of this type
Removing property/relation: increase major version of this type (you will face this problem if version won't be increased)
If you are using APS PHP runtime id of the type should be changed in corresponding PHP scripts, schema files are automatically generated using schema declaration in the code.
If type id was changed remeber to change them in navigation declaration in APP-META.xml and UI files
version of the package itself should be increased in APP-META.xml (usually minor)
add 'upgrade' node in APP-META.xml (http://doc.apsstandard.org/spec/package/updates/) like:
<upgrade match="version =gt= 1.0" />
- build package
- import a new package to POA
- verify that tasks 'importing APS package' and 'updating upgrade relations for APS packages of application' were scheduled and processed
- now new version should appear in tab Versions for your application
- navigate to provider's instance, press 'Upgrade' button
- a task will be scheduled to upgrade this instance
- if any new global settings were introduced in this version fill them in
Note: endpoint should be updated manually (i.e files with older code versions should be removed and new ones placed instead)
Application was upgraded, now latest version definitions will be used (meta information, UI, schemas). Since all subscriptions have a reference to provider's instance they will all get data from the latest package.