Update on SQLTagsManager in Ignition 8.1, not finding sqlTagsManager.browse(tagPath) with return type Tag


I am not able to find the exact replica of sqlTagsManager.browse(tagPath) which has return type as Tag. where as tagProvider.browseAsync(tagPath, BrowseFilter.NONE) is returning Results , NodeDescription is not same as Tag. Can i able get TagProp.OPCItemPath, TagProp.Name from NodeDescription Attribute.

7.9 version changes below

SQLTagsManager sqlTagsManager = this.gatewayContext.getTagManager();
TagPath tagPath = TagPathParser.parseSafe("default", "/" + finalTagPathStr);
for (Tag tag : sqlTagsManager.browse(tagPath)) {
			if (tag.getAttribute(TagProp.Name).getValue().toString().equals(finalTagName)) {
				String tagOPCPath = tag.getAttribute(TagProp.OPCItemPath).getValue().toString();
				if (tagOPCPath != null && !tagOPCPath.trim().equals("")) {
					String[] tagOPCPathComponents = tagOPCPath.split(";");
					if (tagOPCPathComponents.length >= 2) {
						int siteIndex = tagOPCPathComponents[1].indexOf("_");
						if (siteIndex < 0) {
							siteIndex = tagOPCPathComponents[1].indexOf(" ");
						String siteName = tagOPCPathComponents[1].substring(tagOPCPathComponents[1].indexOf("=") + 1,
//						String siteName = tagOPCPathComponents[1].substring(tagOPCPathComponents[1].indexOf("=") + 1,
//								tagOPCPathComponents[1].indexOf("_"));// tagPath.getPathComponent(0);
						String tagName = tagOPCPathComponents[1].substring(tagOPCPath.indexOf("="));
						TagVO tagVO = new TagVO();
						this.tagOpcPathMap.put(tagPathStr, tagVO);

8.1 version of my changes

	GatewayTagManager sqlTagsManager = this.gatewayContext.getTagManager();
	Results<NodeDescription> results = tagProvider.browseAsync(tagPath, BrowseFilter.NONE).get(30, TimeUnit.SECONDS); 

You asked this 11 days ago over here:

That you haven’t gotten an answer to your precise question suggests that the API changes for v8+ tag system are too significant for a one-to-one conversion.

You will have to study the v8.1 tag API to work out the parts you need, as it seems no-one else has an answer.

Thanks pturmel, I was trying to update the current forum which was created 11 days. After multiple edits i thought of creating new, instead of existing thread. Sorry for the confusion.

We have existing custom historian module which was working fine in 7.9 without any issues. when i migrated to 8.1.16 version i am facing the issue with trends even though the module is running. Not getting any application logs too, after adding bunch of log statements.

I will take a look at Tag API