thingworx-field-work / ThingworxVSCodeProject

Develop thingworx models using a real IDE
MIT License
33 stars 17 forks source link

Specify Data Shapes in Stream Things #29

Closed thomas-thomas-tfs closed 3 years ago

thomas-thomas-tfs commented 3 years ago

Hi how do specify the data shapes upon the stream is to be created.?

BogdanMihaiciuc commented 3 years ago

This is normally specified as a configuration table value, which isn't yet supported. I'll probably handle this in a special way by making use of the generic type argument required by the Stream and DataTable types.

I'll try to get something in over the weekend or early next week.

carlo-quinonez commented 3 years ago

Please let us know if there's anything we can do to help.

BogdanMihaiciuc commented 3 years ago

Are you applying thing shapes to your stream?

Using the generic argument when extending from Stream directly will be quite easy to implement, but there are a few typing issues I'll need to figure out when using the ThingTemplateWithShapes mixin which might take a while.

thomas-thomas-tfs commented 3 years ago

yes I'm directly applying it shape over stream like Sample_Stream extends Stream

BogdanMihaiciuc commented 3 years ago

Thanks!

I'll just handle this use case for now then and look into a solution for the mixin in a different update.

BogdanMihaiciuc commented 3 years ago

This should work now by updating to the latest transformer version 0.14.0-beta.1. Please reopen this issue if it still doesn't work following the update.

thomas-thomas-tfs commented 3 years ago

lastest version of bm transformer build is throwing below error TypeError: Cannot read property 'createIdentifier' of undefined at TWThingTransformer.visitThisNode (C:\TFS\Code\GSS\v3\gss-thingworx\extensions-ts\node_modules\bm-thing-transformer\dist\ThingTransformer.js:508:43) at TWThingTransformer.visit (C:\TFS\Code\GSS\v3\gss-thingworx\extensions-ts\node_modules\bm-thing-transformer\dist\ThingTransformer.js:477:33) at C:\TFS\Code\GSS\v3\gss-thingworx\extensions-ts\node_modules\bm-thing-transformer\dist\ThingTransformer.js:485:61 at visitNode (C:\TFS\Code\GSS\v3\gss-thingworx\extensions-ts\node_modules\typescript\lib\typescript.js:74815:23) at Object.visitEachChild (C:\TFS\Code\GSS\v3\gss-thingworx\extensions-ts\node_modules\typescript\lib\typescript.js:75086:54) at TWThingTransformer.visit (C:\TFS\Code\GSS\v3\gss-thingworx\extensions-ts\node_modules\bm-thing-transformer\dist\ThingTransformer.js:485:27) at C:\TFS\Code\GSS\v3\gss-thingworx\extensions-ts\node_modules\bm-thing-transformer\dist\ThingTransformer.js:485:61 at visitNode (C:\TFS\Code\GSS\v3\gss-thingworx\extensions-ts\node_modules\typescript\lib\typescript.js:74815:23) at Object.visitEachChild (C:\TFS\Code\GSS\v3\gss-thingworx\extensions-ts\node_modules\typescript\lib\typescript.js:75096:44) at TWThingTransformer.visit (C:\TFS\Code\GSS\v3\gss-thingworx\extensions-ts\node_modules\bm-thing-transformer\dist\ThingTransformer.js:485:27)

BogdanMihaiciuc commented 3 years ago

Make sure that the version of the typescript dependency matches the version used in the transformer (4.3.4) and that the gulpfile.js file is also up to date.