Creating Tags with History from a gateway module

Hi !

I’m able to build Tags from a gateway module, but I must have missed something I do understand how to give them some properties.

In my GatewayHook class I have
a SimpleTagProvider tagProvider member.

In my GatewayHook::setup method
I do :

tagProvider = new SimpleTagProvider("TheProvider"); try{ tagProvider.startup(context); } catch(Exception e) {...}
And I have the getter method for the tag provider.

In my drivers
I have

private SimpleTagProvider tagProvider; private ExtendedTagType tagType;
I do :
In the connect method :

GatewayHook ecoSpecHook = (GatewayHook)(getDriverContext().getGatewayContext().getModuleManager().getModule("com.example.MyModule").getHook()); if (null!=ecoSpecHook) tagProvider = ecoSpecHook.getTagProvider(); tagType = TagType.Custom; Set<TagProp> tagProperties = TagProp.setOf(TagProp.AccessRights,TagProp.HistoryEnabled,TagProp.HistoryTimestampSource); if (null!=tagProvider) tagProvider.configureTagType(tagType, TagEditingFlags.STANDARD_VALUE,tagProperties);

Then When I have to create a Tag (booelan in this case I do :

 tagProvider.configureTag(tagPath, com.inductiveautomation.ignition.common.sqltags.model.types.DataType.Boolean, tagType);

and to set a value I do :

tagProvider.updateValue(tagPath, value, DataQuality.GOOD_DATA);

As I have set the TagProp.HistoryEnabled I suppose the History should have been activated, but it is not the case.
Some of the properties in TagProp should a value set, How do I set the properties values ?

Since I have done What I presented above, my driver is instable, and when I uninstall it Ignition seems dead locked. I’m not even able to kill it. The only solution is to reboot my computer.
Does anybody know what is missing or wrong ?