Does anyone know what is an "Extension Migrator" for ?
Hi,
All is in the title.
Thanks,
Hi,
All is in the title.
Thanks,
A migrator gets executed automatically as the first step of the "Import from ThingWorx Storage", essentially being a "pre" type hook in the import process.
Beware that it's only executed in the case of "Import from ThingWorx Storage" - it is not executed automatically during the Extension installation process.
Its role is to allow you to pre-process entities that were created with a previous version of the extension, at import time (eg: execute model changes).
The use-case when this is useful is not encountered extremely frequent and it's documented in this document, page 46.
From what I observed, the Migrator class is a relatively unused part of the ThingWorx Extension SDK.
I personally post-process the entities in an entity's Start event, which, while it's correct that it's being executed at each Start event, from a verification perspective it is really lightweight and I gain ThingWorx's flexibility (it's faster to write that JavaScript and use the snippets available in the service editor than using them in Java).
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.