IEtlTask.EventsAssembly

Fore Syntax

EventsAssembly: IMetabaseObjectDescriptor;

Fore.NET Syntax

EventsAssembly: Prognoz.Platform.Interop.Metabase.IMetabaseObjectDescriptor;

Description

The EventsAssembly property determines the repository object used for event handling.

Comments

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.

Fore Example

Executing the example requires that the repository contains:

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.

Fore.NET Example

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:

IEtlTask