Ignition 7.9 to 8.0 : editTags/browse/getTag and queryHistory

In a module for 7.9 I use :

gatewayContext.getTagManager().editTags
gatewayContext.getTagManager().browse
gatewayContext.getTagManager().getTag
gatewayContext.getTagManager().queryHistory

Where are the new function in Ignition 8.0 ???

context.getTagManager().getTagProvider(<name>).saveTagConfigsAsync(edits, policy)
context.getTagManager().getTagProvider(<name>).browseAsync(path, filter)
context.getTagManager().getTagProvider(<name>).getTagConfigsAsync(paths, recursive, localPropsOnly)
context.getTagHistoryManager().getTagHistoryProvider(<name>).createQuery(paths, controller)
1 Like

Thanks @PGriffith

For the browseAsync function, with a browseFilter.setRecursive(true), I can collect all the node, but the NodeDescription::getName doesn’t contain the full path of the tag ?

Does it mean it’s better to do some recursive call to browseAsync in order to be able to obtain the fullTagPath of each tag or is there another way ?

@PGriffith,
I use in 7.9 gatewayContext.getTagManager().editTags to configure some TagProp (FormatString,EngUnit,EngLow,EngHigh,Tooltip,Documentation) on tags from a SimpleTagProvider.

I try to achieve the same with the tags from a ManagedTagProvider.

Instead of saveTagConfigsAsync, is it possible to use configureTag(java.lang.String path, [BoundPropertySet]) rather than configureTag(java.lang.String path, DataType dataType) ?

7.9 flavor was

private void CopyTagProperties(Tag tagSource, String tagPathDest){
	TagPath tagPathSourceDest = TagPathParser.parseSafe("myProv",tagPathDest);
	List<TagPath> listTagsDest = new ArrayList<TagPath>();
	listTagsDest.add(tagPathSourceDest);

	tagDiff.set(TagProp.FormatString,tagSource.getAttribute(TagProp.FormatString).getValue());
	tagDiff.set(TagProp.EngUnit,tagSource.getAttribute(TagProp.EngUnit).getValue());
	tagDiff.set(TagProp.EngLow,tagSource.getAttribute(TagProp.EngLow).getValue());
	tagDiff.set(TagProp.EngHigh,tagSource.getAttribute(TagProp.EngHigh).getValue());
	tagDiff.set(TagProp.Tooltip,tagSource.getAttribute(TagProp.Tooltip).getValue());
	tagDiff.set(TagProp.Documentation,tagSource.getAttribute(TagProp.Documentation).getValue());

	this.gatewayContext.getTagManager().editTags(listTagsDest,tagDiff);
}

… seem to be simplest with a readAsync and writeAsync… :slight_smile:

@PGriffith,
For the conversion of :

gatewayContext.getTagManager().queryHistory

with BasicTagHistoryQueryParams and BasicStreamingDataset

could you please provide an example for :

context.getTagHistoryManager().getTagHistoryProvider(<name>).createQuery(paths, controller)

I don’t understand how to achieve an historical query from gateway scope in Ignition 8

HistoryQueryExecutor javadoc indicate that the result rows are writed to the streaming dataset, if possible but where can we provide a streaming dataset ?