Client module with sql tag read?

Hi,

I try to read sql tags in the client context of a module and I have the following error :
com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Unable to locate function ‘SQLTags.read’

clientContext is memorized from the startup AbstractClientModuleHook.
The exposed function is used in a client script :
import system

liste = []
liste.append("testAlarme")
system.byes.utils.readTag("default",None,liste)
    @ScriptFunction(docBundlePrefix = "ClientScriptModule")
    public void readTag(
            @ScriptArg("source") String source,
            @ScriptArg("system") String system,
            @ScriptArg("pathParts") java.util.List<java.lang.String> pathParts) {
        try {
            List<TagPath> paths = new ArrayList<TagPath>();
            TagProp prop = TagProp.Value;
            paths.add(new BasicTagPath(source,system,pathParts,prop));

            java.util.List<QualifiedValue> qv = this.clientContext.getTagManager().read(paths);

            // une seule valeur prévue pour ce test
            logger.info("readTag return V : " + qv.get(0).getValue().toString());
            logger.info("readTag return T : " + qv.get(0).getTimestamp().toString());
            logger.info("readTag return Q : " + qv.get(0).getQuality().toString());

        } catch (Exception e) {
            logger.error(e.getMessage());
        }
    }

I don’t understand what I have missed :scratch:

This looks like a bug on our end… perhaps one that’s been around for a while.

As a workaround, you can use getTag() and then get the value attribute from the tag instead.

Ok, in fact I was interested by the subscribe function of the sqltag manager in the client scope. read was just a first test. Does the subscribe function works ???

System. Tag. Read function is not based on these functions?

Subscribing should work.

read() isn’t based on getting the attribute from the tag simply because it was missed in some long-ago refactoring, apparently. Our own system.tag.read function uses getTag() and gets the value attribute, which is why it was missed. There must not be any calls to the broken read function happening in client scope in our codebase.

Thanks a lot kevin for theses clarifications !