0 Replies Latest reply on Jun 28, 2017 3:06 AM by bmessenger RSS
    bmessenger Newbie

    Listing Java Functions in Snippets


    I am very new to both Thingworx and developing custom extensions and I have a few questions about things I have not been able to solve.

    Essentially, I want to be able to access custom functions inside my services, be they javascript or java.I am very familiar with javascript and jquery and have my own library of js functions that I'd ideally like to use, but if that is not possible, I'm happy to translate them as I need into java functions.


    So to testy what is usable (and because I cannot find anything that is documented on how this works), I am going down the path of writing a custom extension and am able to do so, but how do I get my java functions/methods to show in the snippets section. I have added a "New Script Function Library" using the Eclipse Thingworx extension plugin and added services to thatCapture1.JPG


    But when I import this into Thingworx, it shows the library but nothing below it.


    If I try and insert a "New Resource" instead (as some info implies this is what is required), I cannot import. I always get the error

    [message: [1,018] Data store unknown error: [Error occurred while accessing the model provider.]]

    So what do I need to do to get things to appear in the snippets area. It will be onerous if all the functions are not viewable or we have to access them through a data shape or thing template.

    I'll further add that I have also tried to write a ThingShape and include all my functions in that instead but when I try to import I get this error

    Import Failed: Validation Failure: ThingShape RegainGenericThingShape Had An Invalid Class Name : [com.regain.thingworx.RegainGenericThingShape] - Possibly Missing Extension Package

    So pretty stuck with only one entity working. Got to be something fundamental I am missing here.