Problem

I want to create a separate application using the code I already have for another package but slightly different. How can I install both packages on the same Odin Service Automation installation?

Resolution

There are two things that must be unique in Odin Service Automation:

  1. Application id
  2. Type ids

To create a new branch of your application, change both application id and references to type ids.

If you use the same namespace consistently through your application it's easy to do.

For example this application uses namespace http://myweatherdemo.com/intro

application id: http://myweatherdemo.com/intro

type ids:

http://myweatherdemo.com/intro/application/1.0 http://myweatherdemo.com/intro/subscription_service/1.0

If you want to create a branch with one additional fix but you do not want to uninstall previous version, use a new tag and apply it consistently to all the types.

These files have intro in type or application id:

APP-META.xml: <id>http://myweatherdemo.com/intro</id>

APP-META.xml: <name>myweatherdemo-intro</name>

APP-META.xml: <var name="company" type-id="http://myweatherdemo.com/intro/subscription_service/1.0"/>

scripts/subscription_service.php: * @type("http://myweatherdemo.com/intro/subscription_service/1.0")

scripts/subscription_service.php: * @link("http://myweatherdemo.com/intro/application/1.0")

scripts/application.php: * @type("http://myweatherdemo.com/intro/application/1.0")

scripts/application.php: * @link("http://myweatherdemo.com/intro/subscription_service/1.0[]")

Use 'search and replace' feature in your editor to replace all occurrences of intro with intro_fix2. On Linux or OS X you can use sed utility as well:

find . -type f -exec sed -i 's/intro/fix2/g' {} \;

Internal content