Restart Industrial Things from service
HI,
I would like to know how I can restart all industrial things after Tomcat reboot.
I made service and it looks like that:
if (itemNumber <= (me.foundThings.rows.length - 1)) {
var foundItem = me.foundThings.rows[itemNumber].Name;
Things[me.foundThings.rows[itemNumber].Name].RestartThing();
for (var x = 0; x < 3000; x++) {
//sleeper
}
me.foundThings.rows[itemNumber].Status = 'Done';
me.foundThings.rows[itemNumber].LastConnection = new Date();
me.RestartConnection({
serverName: serverName /* THINGNAME */,
NameThing: me.foundThings.rows[itemNumber].Name /* STRING */
});
result = itemNumber + 1;
} else {
result = 10000000;
}
RestartConnection service was created to re-append the Kepware server name to the Industrial Thing properties.
My problem is that what I created works very randomly. Of the 3, Industrial Things restarts 1 or 2 or does not add the server name to Industrial Thing.
How can I create a tool to restart all Industrial Things to avoid having to do it manually?
Thank you,
Jan

