Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hello we have ThingWorx 9.6 and are having a dev server for packaging the projects we create and other servers for production in which we actually get some data and process some stuff. I wanted to ask if there is a way to make entities editable again after they have been imported as an extension in the production servers. I have already tried exporting the project and changing all the xml entities to have the aspect.isExtension to false and to modify the entity file itself from the extension folder in the thingworx storage to have aspect.IsEditableExtensionObject="true".
We are trying to change the time in which a scheduler executes and would like this to be configurable, but as the scheduler comes in an extension, it is not possible to currently do so. Is there a way to either get only this entity(Scheduler) to be editable again or is there a way to change the time of the scheduler?
Scheduler can be configured by using service,
var schedulerEntity = Things["<NAME_OF_THE_SCHEDULER>"];
var settings = schedulerEntity.GetConfigurationTable({
tableName: "Settings"
});
var cronString = <Updated_cron_string>;
settings.schedule = cronString;
schedulerEntity.SetConfigurationTable({
configurationTable: settings ,
persistent: true ,
tableName: "Settings"
});
schedulerEntity.RestartThing();
Hello @MF_10165907,
It looks like you have a response from a community member. If it helped you solve your question please mark the reply as the Accepted Solution.
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.
Thanks,
Vivek N.
Community Moderation Team.
Hi @MF_10165907,
Setting aspect.IsEditableExtensionObject="true" does not make the entity editable in Composer?
Which version of ThingWorx are you using?
According to ThingWorx Extension Development Guide, setting the aspect.isEditableExtensionObject attribute on a Thing Template is not supported, does that applicable to your case?
Also, why use the scheduler entity made from extension in the first place? Why not use the OOTB scheduler to schedule the execution of services?
Hello @TonyZhang,
Just my 2 cents, a bit off topic.
Based on my past experience, aspect.IsEditableExtensionObject is dangerous. Not many people understand how it actually works. As a matter of fact, if you edit an entity with this flag set to true, you can't deploy a new version of this entity via extension anymore. Ever. Importing new version of extension will not overwrite such an entity, and you can't remove it from the extension either, so there's simply no way to overwrite it properly via deploying some package. So, if such an entity is an important part of the application, with its own logic / services, etc. -- then you essentially can't update your app anymore. And there's no way around this issue, because very often you can't just uninstall such an extension to remove such "customization", because of the dependencies, so you end up with a "broken" server, which you can't update anymore.
So I just stick to "don't set IsEditableExtensionObject, it will bring you in trouble sooner or later" principle.
/ Constantine