While importing 'AllEntities.twx' or 'AllEntities.xml' on Thingworx composer, sometimes I get an error while importing, saying that a particular entity was not found.
As a practice I have tagged all my entities and while exporting I am using that tag to export all the entities.
So probable cause of failing during import, I assume, lies in the fact the order in which the entities are getting imported in a composer environment. I would give an example to better explain my assumption, say I have a "DataTable-A" entity which depends on "DataShape-A", and while importing AllEntities, somehow "DataTable-A" starts to import first, but since the relevant dependency of "DataShape-A" was missing, the import step failed.
So I would like to know, first, if my understanding or assumption is correct, and second, is there a way to prevent this?
One way I figured out was to export the entities individually and then importing them in the right order manually, like importing DataShapes and ThingShapes first, followed by Templates, then things and finally Mashups (just an example). But this becomes too cumbersome at both ends, while import as well as during export.
Any suggestions to overcome this would be appreciated.
From my experience with importing all entities, i.e. a single "Entities.twx" file, I have found that Thingworx usually imports them in the correct order. So maybe the assumption of it failing might be wrong. Is there any error message you get while importing?
You might want to try using source control entities to export and import. This way you can have a backup of all entities and during import you can also select which entities you want to import. The order is usually taken care of here too. However, if that's not the case, the benefit is that rather than manually importing one at a time you get a checkbox selection to import multiple entities. So even if one fails, it is easy to start the process and complete the rest before revisiting the failed one.
I've never faced this problem, when I get this error it's becouse an entity it's missing not becouse of the Import Order, it's all managed in the same transaction as far as I know .
No I am not using any externally imported extension. They are default Thingworx entities. Well I suppose there could be mistake in my understanding and assumption about sequence of import. I will try to look into this issue once again and see if I am able to fix this or get the actual cause of it.
Thanks all for your inputs and suggestions.