Question
Setting ValueStream programatically to a ThingTemplate
I have created a template using the Extension Java SDK and am setting the ValueStream on initialization as below:
public void initializeThing() throws Exception {
super.initializeThing();
Thing deviceVS = ThingUtilities.findThing("MyValueStream");
if (deviceVS != null) {
this.SetValueStream(deviceVS.getName());
}
}
Is this the correct way of doing so? Is there any other way of specifying the ValueStream on the Template, just like we specify a property using the @ThingworxPropertyDefinition annotation.
Thanks in advance.

