Inconsistent behavior when importing the Uniface Model (.amx) file from SVN

Author: jayesh.g.patel@accenture.com (Jayesh82mscit)

Hi All, Recently we encountered the issue while importing Uniface Model (.amx) file from the source control into Uniface IDF. We are using Subversion for source control. Our application is running with Uniface 9.6 version. Here is the detail on the problem that we faced. Lets say, Developer# 1 has Uniface Model file "abc.amx" into his local Uniface IDF development environment. Here he has introduced one field ("Agent_sub_code) in one of the entity called Agent but abc.amx model file is not checked-out OR locked by his user id. This Model file is sitting into his IDF for few days before he actually locked (Checkedout) the abc.amx file from SVN. As of now, please note that the version of abc.amx which is downloaded from SVN doesn't have field called "agent_sub_code" under "agent" entity. As per usual process, he checked out the abc.amx file into one of the local folder and then using import function (Uniface IDF >> Utility >> Import), loaded the abc.amx file into IDF. The purpose of this checkout in SVN was to introduce the new(different) field called "ZipCode" inside "employee" entity. As the import process will overwrite your local changes with SVN version (that you have downloaded/checked out), developer did not bother to validate his previous changes what he made locally (about field called "agent_sub_code"). Once the intended changes (adding "Zipcode") were completed, he just "Analysed the Model" and Check-in the Model file abc.amx into SVN. However, later it was discovered that his local changes of "agent_sub_code" are also reflected into the Check-In version of SVN. I am under impression that import process will overwrite all of the local changes with SVN source version and that is how it works perfectly fine for other Uniface components like Service, session server, forms etc. But seems NOT in the case of Uniface Model file import. We tried this multiple times with Model (.amx) file and noticed that the additional fields (for specific entities) are remained in IDF inspite of SVN version doesn have these fields. Only workaround we explored is that you first delete the "agent" entity from IDF and then perform the import with SVN source version. By doing so, we dont find "agent_sub_code_ field in "Agent" entity. Looking for your help to understand if this is the limitations with Uniface in case of Model (.amx) file import process OR Am I missing/doing something wrong here ? Appreciate your response here. Thanks Jayesh

2 Comments

  1. Hi Jayesh, in uniface the repository (and this includes the datamodel as well) is just stored as a couple of data records. Exporting a model just collects the relevant existing records into a file (just like any other /cpy will do). Reimporting the exported model information just adds/updates these exported records keeping all other existing records untouched.


    Author: ulrich-merkel (ulrichmerkel@web.de)
  2. Hi Jayesh, As mentioned in the previous reply, Uniface will only add or update the records it can find in an export file. It will not delete anything. On GitHub you can find a Version Control tool (or more accurately a synch tool) that will synchronise a repository database with an export source code folder. As part of the synchronization the tool will first delete an existing model before it will import a newer version of the model from the source code folder. You can download the current version of the tool (for Uniface 9.7) from here. And the setup is described in the ReadMe. Hope this helps. Kind regards, Daniel Uniface Technical Support


    Author: diseli (daniel.iseli@uniface.com)