AddAlarmDefinitionServerTask: EventTypeValues is always empty, and other questions

Hello,

I have an AddAlarmDefinitionServerTask to which I am setting the EventGroupType with a value from the EventGroupTypeValues dictionary, and then I call UpdateState() and I’m expecting to see EventTypeValues give me a meaningful list of options after that, but it always comes back blank. Am I doing something wrong here?

Also, EventGroupTypeValues seems to collapse a couple of the entries that are visible in the XProtect Management Client (ie, ‘Access Control Event Categories’ and ‘Transaction Events’) into a single key ‘Undefined’.

The other thing is just some ambiguity in the documentation; I’m guessing the SourcesList property is supossed to be a comma-separated list of ObjectId GUIDs?

For what it’s worth, we are using XProtect Corporate 2019R3 server and the 2020R2 SDK.

Thank you,

Derek

Di Derek,

Sorry for the late response!

The UpdateState() function is only relevant when the server side are performing some long executing task - like adding new hardware or moving storages around.

As you update some selection, you sjould call the ValidateItem(item) - and check the outcome, then select a new selection/enum and call ValidateItem again.

The ValidateItem is similar to what happens when you configure the AlarmDefinition in the Management Client.

As for Access Control and Transact - these are not supported right now.

When Property.ValueType is PathList, then the value should be a comma seperated list of Paths, where Path is the one coming from a ConfigurationItem.Path.

Hope this helps,

Anders

Thank you Anders,

I can’t tell you how pleased I was to see EventTypeValues.Count

return a nonzero number!

Now the only ambiguity that remains is if there is a simple way to filter the ConfigurationItems for SourceList by the appropriate EventType – the ConfigApiClient component sample is pretty hard to learn from because it’s a lot more generalized than any of the code in our product.

I found out that after setting the EventType and calling ValidateItem() I can call GetValueTypeInfoList(“SourceList”) and see what ConfigurationItem paths are valid for the SourceList on that EventType! I’m on the right track now :slight_smile:

Thanks again,

Derek

Good to hear!

Anders