The Event Handling page in the ETL task editing wizard is used to specify a development environment object and a class that contains implementation of event handlers for ETL task.
Set the following options:
Unit. Select the Select > Select from Repository item and select the existing unit containing implementation of the class for handling ETL task events. If required, select the Select > Create item to create an event handler automatically. The unit with automatically generated code is created.
Class. Select in the drop-down list the class containing implementation of ETL task event handlers. The list of handler classes contains all classes inherited from the EtlTaskExecutionEvents class. Event handler class can have the designer called at each class initialization. The designer must not contain parameters. If the class has several constructors without parameters, the first one is called (located above the others in the code).
NOTE. The class handler is initialized each time ETL task is executed.
The unit containing the designer and templates of ETL task events:
Class EventsClass: EtlTaskExecutionEvents
Constructor Create;
Begin
End Constructor Create;
Public Sub OnStartTask(Task: IEtlTask);
Begin
End Sub OnStartTask;
Public Sub OnEndTask(Task: IEtlTask; Duration, TotalRec, ErrorRec: Integer);
Begin
End Sub OnEndTask;
Public Sub OnStartBlock(Task: IEtlTask; Object: IEtlObject);
Begin
End Sub OnStartBlock;
Public Sub OnEndBlock(Task: IEtlTask; Object: IEtlObject; Duration: Integer; TotalRecIn, TotalRecOut, ErrorRec: IDictionary);
Begin
End Sub OnEndBlock;
Public Sub OnProgress(Task: IEtlTask; Progress: Integer);
Begin
End Sub OnProgress;
Public Sub OnError(Task: IEtlTask; Object: IEtlObject; Excep: IException);
Begin
End Sub OnError;
End Class EventsClass;
See also: