Annotations not showing for all functions

I’ve just made a scripting module here, and its odd but I have several methods like:

 @Override
    @ScriptFunction(docBundlePrefix = "AbstractCouchScripts")
    public PyDictionary getData(
            @ScriptArg("ConnectionName") String ConnectionName,
            @ScriptArg("MangoQuery") String MangoQuery) {
        return getData(ConnectionName, MangoQuery);

    }

    @Override
    @ScriptFunction(docBundlePrefix = "AbstractCouchScripts")
    public PyDictionary getDataDict(
            @ScriptArg("ConnectionName") String ConnectionName,
            @ScriptArg("MangoQuery") PyDictionary MangoQuery) {
        return getDataDict(ConnectionName, MangoQuery);
    }

For some reason the method getDataDict is working with perfect annotations (hint in the designer) but all others no :confused:
This is correct:


All others are missing:

My properties file is like that:

saveData.desc=Save a document on CouchDB.
saveData.param.ConnectionName=Name of configured connection.
saveData.param.Data=PyDictionary with data to save.
saveData.returns=Returns a PyDictionary with the couch response.
getData.desc=Get a document on CouchDB.
getData.param.ConnectionName=Name of configured connection.
getData.param.MangoQuery=String with mango query.
getData.returns=Returns a PyDictionary with data returned from the query.
getDataDict.desc=Get a document on CouchDB using a PyDict as query.
getDataDict.param.ConnectionName=Name of configured connection.
getDataDict.param.MangoQuery=PyDict with the mango query.
getDataDict.returns=Returns a PyDictionary with data returned from the query.
updateData.desc=Get a document on CouchDB using a PyDict as query.
updateData.param.ConnectionName=Name of configured connection.
updateData.param.Data=PyDict with data to update.
updateData.returns=Returns a PyDictionary with data returned from the query.
removeData.desc=Remove a document on CouchDB.
removeData.param.ConnectionName=Name of configured connection.
removeData.param.Id=Document _id.
removeData.param.Rev=Document _rev.
removeData.returns=Returns a PyDictionary with couch response.

Any ideas?

Whenever I have trouble with BundleUtil, I restart the gateway before I look elsewhere.

I restarted and nothing yet.

Did you restart the Designer too?

What you’ve posted looks right… how is the bundle being loaded? where is it located? Do you have other incomplete bundles lying around maybe from trying different locations?

No, I’ve been checking all my bundles and they are all fine, including in the gateway webpage (which are little bit harder to tune!).
And for this specific bundle I have a very odd thing where one of my functions (system.couchdb.getDataDict()) is working perfectly and is located in the same bundle as the other ones (system.couchdb.*).
Maybe I cannot place multiple functions in the same bundle?

Multiple functions should be fine, most/all of our bundles for scripting functions have multiple.

Just realized that the problem is bigger:
If you check the getData function we can see that the @ScriptArg notation is not working either their params is not showing too :confused:

    @Override
    @ScriptFunction(docBundlePrefix = "AbstractCouchScripts")
    public PyDictionary getData(
            @ScriptArg("ConnectionName") String ConnectionName,
            @ScriptArg("MangoQuery") String MangoQuery) {
        return getData(ConnectionName, MangoQuery);

    }

How closely did you follow the scripting-function example?

I’ve added a second function to this and it shows up in the hints along with the first. Where are you pulling up the auto-complete menu? My test was using the Designer script console.

1 Like

Found it!! My bad here, my AbstractClass was named abstract… but in the truth it wasn’t abstract. :rofl: :rofl:
Thanks :slight_smile:
Now my module is on Ignition Exchange under review :wink: