# ExecutableTag Alarm configuration

**URL:** <https://forum.inductiveautomation.com/t/executabletag-alarm-configuration/6741>\
**Category:** Module Development\
**Created:** [June 20, 2013, 10:13pm UTC](https://forum.inductiveautomation.com/t/executabletag-alarm-configuration/6741 "2013-06-20T22:13:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![idelamer](https://avatars.discourse-cdn.com/v4/letter/i/e5b9ba/32.png) [@idelamer](https://forum.inductiveautomation.com/u/idelamer)\
**Post date:** [June 20, 2013, 10:13pm UTC](https://forum.inductiveautomation.com/t/executabletag-alarm-configuration/6741/1 "2013-06-20T22:13:28Z")

</div>

I’ve developed a TagProvider that uses DBTagStore to store/load Tag configuration.

I’m having a problem since upgrading from 7.5.x to 7.6.1

When I create a tag, it initially has an all-empty configuration (other than type). In the new version, when I attempt to store a tag, I get a NullPointerException here:

`	at com.inductiveautomation.ignition.gateway.sqltags.providers.datasource.tagstore.DBTagStore.storeAlarmConfiguration(DBTagStore.java:2359)
	at com.inductiveautomation.ignition.gateway.sqltags.providers.datasource.tagstore.DBTagStore.insertTags(DBTagStore.java:1745)
	at com.inductiveautomation.ignition.gateway.sqltags.providers.datasource.tagstore.DBTagStore.addTagsV2(DBTagStore.java:1664)
	at com.inductiveautomation.ignition.gateway.sqltags.providers.datasource.tagstore.DBTagStore.addTags(DBTagStore.java:1651)
`

My tags extend AbstractExecutableTag.

What would I need to do to store the tag with an empty Alarm Configuration? There isn’t too much documentation about this.

Cheers  
Ivan

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [July 1, 2013, 3:51pm UTC](https://forum.inductiveautomation.com/t/executabletag-alarm-configuration/6741/2 "2013-07-01T15:51:18Z")

</div>

Hi,

I think the quickest, and most appropriate, way to get around this is to switch from defining your tags as a subclass of AbstractExecutableTag, and instead use the TagDefinition class. The “exectuable tags” are normally built by the system off of the definition, and they do tricky things to try to minimize memory. Fundamentally, the error your reported should be fixed, but still, that wouldn’t be 100% correct, because if you’re trying to define a new tag, the AbstractExecutableTag isn’t going to really let you do it correctly.

Since you’re not doing much init, you should be able to simply switch over to TagDefinition without much difficulty.

Let me know how it goes,

---

<div class="post-metadata">

**Author:** ![idelamer](https://avatars.discourse-cdn.com/v4/letter/i/e5b9ba/32.png) [@idelamer](https://forum.inductiveautomation.com/u/idelamer)\
**Post date:** [July 8, 2013, 10:12pm UTC](https://forum.inductiveautomation.com/t/executabletag-alarm-configuration/6741/3 "2013-07-08T22:12:17Z")

</div>

Hi Colby,

Thanks for the reply. I decided to try an alternate route for this module: use the built-in Tag Providers and search/modify the tags through the context manager. It’s going OK but have an issue (please see related thread).

If that fails, I will pursue this route again and try your suggestion.

Cheers  
Ivan

---

<div class="post-metadata">

**Author:** ![idelamer](https://avatars.discourse-cdn.com/v4/letter/i/e5b9ba/32.png) [@idelamer](https://forum.inductiveautomation.com/u/idelamer)\
**Post date:** [July 9, 2013, 8:05pm UTC](https://forum.inductiveautomation.com/t/executabletag-alarm-configuration/6741/4 "2013-07-09T20:05:10Z")

</div>

I tried the suggestion and using TagDefinition solved the issue with Executable tags, I just replaced the code by new TagDefinition(myExecutableTag) when adding tags to the TagStore.

However, now I have a problem with folder tags. This is the Exception:

`java.lang.NullPointerException
	at com.inductiveautomation.ignition.gateway.sqltags.providers.AbstractTagStore.flattenTags(AbstractTagStore.java:290)
	at com.inductiveautomation.ignition.gateway.sqltags.providers.datasource.tagstore.DBTagStore.addTagsV2(DBTagStore.java:1660)
	at com.inductiveautomation.ignition.gateway.sqltags.providers.datasource.tagstore.DBTagStore.addTags(DBTagStore.java:1651)`

I tried using TagDefinition here but without success.

Any ideas?

Cheers  
Ivan

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [July 9, 2013, 11:46pm UTC](https://forum.inductiveautomation.com/t/executabletag-alarm-configuration/6741/5 "2013-07-09T23:46:46Z")

</div>

Make sure you’re passing in some sort of parent folder, even if it’s just empty (TagPathParser.parse("")).

Regards,

---

<div class="post-metadata">

**Author:** ![idelamer](https://avatars.discourse-cdn.com/v4/letter/i/e5b9ba/32.png) [@idelamer](https://forum.inductiveautomation.com/u/idelamer)\
**Post date:** [July 10, 2013, 6:23pm UTC](https://forum.inductiveautomation.com/t/executabletag-alarm-configuration/6741/6 "2013-07-10T18:23:04Z")

</div>

Thanks! that did it.

Ivan
