9.8. Anatella-Scripts automatic versioning

<< Click to Display Table of Contents >>

Navigation:  9. Anatella for the Expert Users >

9.8. Anatella-Scripts automatic versioning

 

The automatic versioning system of Anatella transparently updates your Javascript/R/Python Actions to the latest revision to ensure you that you are always using the latest and best version of all your customized & precious Anatella-scripts-Actions.

 

You can always disable the automatic update system by un-checking the “Update scripts to the latest version when loading graph” option inside the “Global Settings” window.

 

 
The update mechanism works this way:

 

a)When Anatella starts, it loads in memory all the “re-usable” Script-Based actions from the hard-drive. These actions will be used as “references” later on (when loading Anatella graphs). Each different “re-usable” script-based Action is actually loaded from a different .xml file. These .xml files are located in three different folders:
 

1.The Built-In folder: Usually: “c:\program file\TIMi\plugin”.

2.The User folder: Usually: “c:\users\<my name>\documents\anatella\userPlugin”.

3.The Shared folder: Usually: a network share or a drop-box synchronized folder.

 

(See section 9.7. for more information about these different folders).

 

It can happen that one specific Script-Based actions is defined by an .xml file located inside the “User Folder” and also by an .xml file located inside the “Shared Folder” (these two .xml file share the same name/ID). In such situation, by default, Anatella uses the .xml file located inside the “Shared Folder” (unless the Action is listed inside the “non-shared list of action”. In which case, Anatella uses the .xml file located inside the “User Folder”).

 
 

b)When Anatella opens a data-transformation-graph for editing, it checks all the Script-Based actions contained in the .anatella graph file against the reference “Re-Usable” Actions currently in memory: More precisely, the check succeeds if:
 

oThe “script name” of the loaded Action matches the “script name” of a reference Action XX currently in memory.

oThe “Auhor” of the loaded Action matches the “Auhor” of the same reference Action XX currently in memory.

oThe “Revision Number” of the loaded Action is inferior to the “Revision Number” of the same reference Action XX currently in memory.

 
When the check is successful, the JavaScript/R/Python code of the loaded Script-Based-Action is replaced (i.e. “upgraded”) by the code of the corresponding “reference” Action XX currently in memory. This allows to automatically “upgrade” old Javascript/R/Python code to new code.

 

 
As you can see, the versioning system relies heavily on the “script name” of the Actions.

 

 
Each time that you customize the source code of an Action, Anatella automatically adds the “My_” prefix to the “script name” of the customized Action. This automatic change is required to prevent Anatella to make any “abusive update” of your customized Action (an “abusive update” is an update that replaces & destroys your nice&new customizations with the standard JavaScript/R/Python source code of one “reference Script” currently in memory).

 

 

There are basically two reasons why you might want to change the source code of an Action:

 

1.You are developing a completely new transformation.

 

Click the AN76E5~1_img186 button in the “publication” tab and re-start Anatella: Your new script should now appear inside the “Transformation” list in the required categories (or inside the “Deprecated Transformations” list if you checked the “Publish as deprecated’” option), alongside with all the other re-usable scripts.

 

 

2.You are correcting/fixing a bug that you found inside the JavaScript/R/Python source code.

 

Once you have finished working on the source code, simply click on the AN76E5~1_img207 button inside the “publication” Tab:

 

AN76E5~1_img208

 

…and restart Anatella. From now on, each time that you open an Anatella-Graph, Anatella will automatically uses the latest modifications that you just committed (unless you de-activated the “Update scripts to the latest version when loading graph” option in the “Global Options” window).