Publish application, deletes it in TM1 Applications portal

Product:
Planning Analytics 2.0.3
IBM Cognos TM1 Applications
Microsoft Windows 2016 server

Issue:
When publishing a updated TM1 application in Performance Modeler to the TM1 Applications web (contributor web portal), the application is deleted.

Error can be:
[DeployApplicationThread:9b649fa9-1cf1-46f7-9bae-5f2fde393121] ERROR () com.ibm.cognos.pmpsvc.PMPService – deployApplication Throwable
com.ibm.cognos.pmpsvc.PMPSVCException: An exception occurred on the server. Please contact your system administrator. :com.ibm.cognos.pmpsvc.handler.PMPTM1Exception: TI_NODE_NOT_EXIST[CAMID(“CDS:u:uid=roger,ou=people,ou=eu”) | }tp_modify_application_attribute | }ElementAttributes_}tp_applications, BounceMode ] :EXCEPTION

Solution:
There is a chance that there are “left-overs” from a old application with similar name in the portal, therefor the application is deleted before a new is created. The first time you publish a TM1 application to a new PMPSVC (contributor) web server, you need to ensure there is not a old application there since a previous crash.

Before republishing a old TM1 10.2.2 application to a new PA 2.0.3 server do this;
— stop the TM1 instance windows service.
— erase the log folder for the tm1 instance.
— copy a new fresh data folder from the TM1 10.2.2 application.
— surf to http://paservername.domain.com:9510/pmpsvc and remove the old application with the same name from the list of applications. You do this from the TM1 applications configuration page. You must be ADMIN in the TM1 instance you try to remove.
Check in the file TM1InstallRoot\webapps\pmpsvc\WEB-INF\configuration\fpmsvc_config.xml that the application is not listed any more.
— stop the IBM Cognos TM1 windows service (tm1web and pmpsvc service).
— surf to Cognos Analytics http://caservername.domain.com/ibmcognos and go to Team Content – IBM Cognos TM1 Applications – My Applications. Remove the link to your published application. PM can not publish a application if there already exist on with the same name.
— start the IBM Cognos TM1 Windows service (pmpsvc service).
— start the TM1 instance, that you had issues with.
— Surf to http://paservername.domain.com:9510/pmpsvc and add the TM1 instance to the portal, and make it a application you can work with from PM tool.
— Log into Performance Modeler as a ADMIN in your TM1 application. Open up and see the application you have built before, validate the application first. Then try to publish it again.

If you have a working TM1 instance, then above should solve the issue, because you start from a fresh working data folder. There should not be any corrupt files you need to delete. Surf to http://paservername.domain.com:9510/pmpsvc to see if it worked.

More Information:
https://www.ibm.com/support/knowledgecenter/en/SS9RXT_10.2.2/com.ibm.swg.ba.cognos.tm1_inst.10.2.2.doc/c_tm1_inst_contrib_strtlnk.html

If you Run the }tp_admin_delete_all process from Architect, then all applications can be erased, and you may have to recreate them.