Events: IMetabaseCustomForeEvents;
The Events property returns a collection of custom events.
Custom events are stored in repository metadata. Event occurrence is tracked with task scheduler. In this case the task container specified in task scheduler settings should contain tasks run on occurring the configured event.
The event can occur as a result of any other task execution, if corresponding setting is made for it. The event can be also generated from application code using the Invoke method.
Add links to the Metabase system assembly.
The example of custom event creation:
Sub UserProc;
Var
MB: IMetabase;
CustomClassExtender: IMetabaseCustomExtender;
Events: IMetabaseCustomForeEvents;
ForeEvent: IMetabaseCustomForeEvent;
Begin
MB := MetabaseClass.Active;
//Get custom classes container
CustomClassExtender := Mb.SpecialObject(MetabaseSpecialObject.CustomExtender).Edit As IMetabaseCustomExtender;
//Get the list of events
Events := CustomClassExtender.Events;
ForeEvent := Events.Add("BEGIN_LOAD");
ForeEvent.Name := "Application login";
(CustomClassExtender As IMetabaseObject).Save;
End Sub UserProc;
See also: