How do I publish a new version of an application?

cloudyrobert
Kilo Guru

Please feel free to refer me to a docs site page or similar as this seems fundamental, but I'm not finding the answer.

I have a custom application that I've deployed to other instances by publishing it to the app repository and then installing it on the other instances (all our company). We have since cloned over the development environment. I want to publish a new version of the application. We've been developing in the correct scope (not in Studio), but I now am observing that I can't open the application in Studio, and I don't see any options for deploying the new version of the application.

1 - Have I done something wrong here that is going to keep us from being able to update our own application?

2 - Am I missing something obvious that allows publishing updates, a setting, perhaps?

1 ACCEPTED SOLUTION

Oleg
Mega Sage

In general it's enough to change the version of sys_app and the publish it to application repository. If you goes in System Applications > My Company Applications on another instance then you will see suggestion to update the application. No other possibilities (for example deleting of applications from Application Repository) are available.

In general if you install applications from Application Repository then you have no more an entry in sys_app table. Instead of that you an entry in sys_strore_app table. Both sys_app table and sys_strore_app table have sys_scope table as the base table.

In general, it's strictly recommended to make backup of applications, which you develop either on private Git repository (for example on bitbucket, which is available for free) or at least export it as XML file. It allows you to install the application and continue development manually or with respect of Application Studio.

I suppose that you deleted sys_app entry during cloning of your instances. It explains, why you don't see the application in Application Studio. I'd recommend you to restore the application from Git or from XML backup (if you have someone). If you have export of only an old version of your application then you will be need to combine the XML file with data exported from your current application.

If you don't have then you could try to export all files of application to XML from sys_strore_app table, then export sys_store_app entry to XML and manually modify it to sys_store entry. As the result I 'm sure one will be able to restore your application.

View solution in original post

4 REPLIES 4

Oleg
Mega Sage

In general it's enough to change the version of sys_app and the publish it to application repository. If you goes in System Applications > My Company Applications on another instance then you will see suggestion to update the application. No other possibilities (for example deleting of applications from Application Repository) are available.

In general if you install applications from Application Repository then you have no more an entry in sys_app table. Instead of that you an entry in sys_strore_app table. Both sys_app table and sys_strore_app table have sys_scope table as the base table.

In general, it's strictly recommended to make backup of applications, which you develop either on private Git repository (for example on bitbucket, which is available for free) or at least export it as XML file. It allows you to install the application and continue development manually or with respect of Application Studio.

I suppose that you deleted sys_app entry during cloning of your instances. It explains, why you don't see the application in Application Studio. I'd recommend you to restore the application from Git or from XML backup (if you have someone). If you have export of only an old version of your application then you will be need to combine the XML file with data exported from your current application.

If you don't have then you could try to export all files of application to XML from sys_strore_app table, then export sys_store_app entry to XML and manually modify it to sys_store entry. As the result I 'm sure one will be able to restore your application.

Just some additional information in case anyone else stumbles across this thread.

Beginning with a backup instance from just before the clone...

We were unable to try the source control method as our git is only available within the network, and source control does not yet support use of a MID server. I submitted an enhancement request and suggest that others do the same.

I published the app to an XML update set. This committed into an environment that didn't yet have the application installed with no issues. However, when committing in an environment where the app had been installed from the repository, it failed to create the sys_app record, and we were basically left with what we'd had before (I skipped the files we had since updated in development).

My plan at this point is to do a clone of our sandbox environment, bring in the application through the update set, bring over the development we've done since the last clone, and migrate it with update sets going forward. 

dabi
Tera Guru

If you're within 7 days of a clone, you can roll back and possibly export what you need based on @Oleg's post.

https://docs.servicenow.com/search?q=roll+back+a+clone

Sri61
ServiceNow Employee
ServiceNow Employee

Relliott,

You have lost authorship of your application after clone. You should have backed up your application source control repo outside of Servicenow like Github,GitLab etc

 

1. If it's within 7 days of your clone you can rollback

2. If you are an admin of your instance, Go to your Hi Service Portal > Manage instance > restore the backup of your source instance over one of your sub-prods and you can restore the app that you lost before clone.

 

To avoid this in future please follow the procedure outlined in the URL below

https://docs.servicenow.com/bundle/london-application-development/page/build/applications/task/preserve-applications-during-clone.html

 

Hope this helps,

Thanks,
Sri