Automation Event Definition plugins enable support for custom API events within automations.
[toc]
Why implement an Automation Event Definition?
When a customization includes custom APIs and events, an Automation Event Definition implementation will be required to expose the custom events to the automation framework to enable automations to implement custom scripted logic against the custom API/events.
Creating an Automation Event Definition
The IAutomationEventDefinition interface has one member:
public interface IAutomationEventDefinition : IPlugin { void RegisterEvents(IAutomationEventController controller); }
The RegisterEvents() method provides the IAutomationEventController to the plugin. The controller exposes a method that can be used, once received by the plugin, to register available events:
public interface IAutomationEventController { void RegisterEvent(string entityName, string eventName, Type eventArgumentsType, Action<AutomationEventHandler> attachHandler, AutomationEventOptions options = null); }
For each event exposed by a custom application, the RegisterEvent()
method should be called, providing the following parameters:
- entityName. The name of the entity. For example, blog post is "BlogPost". The entity name should be unique, clear, and singular. This will be used when looking up available events and when matching automations' event triggers to available registered events.
- eventName.The name of the event. For example, before a blog post is created, the "BeforeCreate" event is executed. General naming is
[Before|After][Create|Update|Delete]
. This will be used when looking up available events and when matching automations' event triggers to available registered events. - eventArgumentsType. The .net
Type
of any arguments provided by the event. An object of this type should be provided when the event occurs. - attachHandler. This is an action that is provided an
AutomationEventHandler
delegate which receives an object representing the event arguments. TheattachHandler
will be called when at least one automation is configured to be triggered by this event. - options. Options provides two properties:
IsObsolete
to identify that the event is no longer recommended for use and will be removed; andGetDescription
which is a function used to retrieve a description of the event to show in documentation.
When an Automation Event Definition plugin is enabled within Verint Community, it is fully integrated into Automation Studio: type-ahead searching, documentation, and event triggering.