TABLE OF CONTENTS
What is a generated file?
A generated file is nothing but a translation of your Template's Asset Library (Asset Types & Properties) into a python compatible classes and attributes respectively. We use this translation to map a particular attribute of a class to a particular property of an Asset Type in KES.
Let's see an example to see how both correspond and map with each other.
Below picture is a screenshot from the template editor and it shows the Asset and properties.
Below picture is a sample generated file where you can see classes and attributes of a python script translated from the above Asset and properties.
The UUIDs you see above is the actual ID of the particular property or Asset type that we store in the Database.
In order to make it distinct in our system, we don't reuse the same ID for different versions of a particular template.
So, when you are developing a template, if it is unpublished and you download the generated Script file, you will have a particular ID. Once you publish it, and download the generated script file for that particular published version, you will see that the IDs of the same AssetType of Property are different.
Generated script of version 2 of a template will not work for an activity that is created using version 3 of that same template. This distinction is necessary to keep in mind when you develop scripts.
Hence, a generated file for a particular version will be applicable for the Activity of that specific version of the Template.
How to access/download a generated file?
There are different places from where you can download the generated file.
- Inside a template editor.
- You can download it from the three vertical dot menu and click Download Script.
- As mentioned above, this will download a generated file for an unpublished version of the template, which you can use to develop your script, but mind that this will not work for the actual production activity which is created using a published version of the template.
- From the template list window.
- You can download it by clicking on the three vertical dot menu and clicking Download Script.
- The generated file is only applicable for the activity which are created for that particular published version.
- You can only download a generated script or attach your scripts after publishing.
- From the activity list screen inside a project.
- You can download it by clicking on the three vertical dot menu and clicking Download Script.
- The generated file that you download from here will be applicable to that activity and also any activity that is created using the same template and version number.
You can use multiple generated files of different templates if you want to copy or compare data between several activities of those templates.