EventsAssembly: IMetabaseObjectDescriptor;
EventsAssembly: Prognoz.Platform.Interop.Metabase.IMetabaseObjectDescriptor;
The EventsAssembly property determines the repository object used for event handling.
To use this property, determine event handler class via the IEtlTask.EventsClass property.
Event handlers for ETL task can be Fore and Fore.NET objects.
Executing the example requires that the repository contains:
An ETL task with the ETL_TASK identifier.
A Fore/Fore.NET object with the IETLTASKEXECUTIONEVENTS identifier, in which the EventsClass class is described.
Add links to the Metabase and ETL system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Etltask: IEtlTask;
Object: IMetabaseObjectDescriptor;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get ETL task
Etltask := MB.ItemById("ETL_TASK").Edit As IEtlTask;
// Get and set event handle unit
Object := MB.ItemById("IEtlTaskExecutionEvents") As IMetabaseObjectDescriptor;
Etltask.EventsAssembly := Object;
Etltask.EventsClass := "EventsClass";
// Save changes
(Etltask As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the specified ETL task uses event handler.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Etl;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Etltask: IEtlTask;
Object: IMetabaseObjectDescriptor;
Begin
// Get repository
MB := Params.Metabase;
// Get ETL task
Etltask := MB.ItemById["ETL_TASK"].Edit() As IEtlTask;
// Get and set event handle unit
Object := MB.ItemById["IEtlTaskExecutionEvents"] As IMetabaseObjectDescriptor;
Etltask.EventsAssembly := Object;
Etltask.EventsClass := "EventsClass";
// Save changes
(Etltask As IMetabaseObject).Save();
End Sub;
See also: