Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
private static int pushuploadfile( SGIThing sgiThing, Map<String, String> aI ) {
try {
for (Map.Entry<String, String> entry : aI.entrySet()) {
sgiThing.setProperty( entry.getKey(), entry.getValue() );\
// Thread.sleep(250);
}
sgiThing.updateSubscribedProperties(5000);
} catch (Exception e) {
Log(LogName+": Error in property processing"+e.getMessage());
}
return 0;
}
I have 17 unique entries in the Map ( thingshape). About half the time, none of the 17 properties get updated on the platform, even though
i think I have my platform and ems properties in sync. The properties are only updated once every 24hrs. Even the very first time this code
is executed at ems start up, i don't see any properties set on the platform. If I uncomment the Thread.sleep(250) the properties are updated on
platform correctly all the time and more importantly the very first time.
Is there some setting in the ems or platform I can use such that the sleep can be removed, or is there a queue adjustment to be made or ...
and if so how/where/what/when?
here is an example of my ems settings,
@ThingworxPropertyDefinitions(
properties = {
@ThingworxPropertyDefinition(name = "Hostname", description = "", category = "", baseType = "STRING", aspects = {"dataChangeType:VALUE","dataChangeThreshold:0","isPersistent:false","isReadOnly:false","pushType:VALUE","cacheTime:0"}),
platform, partial thingshape template,
Hostname, remote, string, no default value, Persistent and read only not checked, logged is checked, data change type = value,
Remote Prop Name = Hostname, Cache Options = read from server cache, Push Type = pushed based on value changed,
Push Threshold = 0, timeout = use system default, When Disconnected = fold, no alerts.