IEtlBox.ExecuteTask

Syntax

ExecuteTask(ExecCallback: IEtlExecutionCallback);

Parameters

ExecCallback. Object that is used to monitor ETL task process execution.

Description

The ExecuteTask method starts ETL task execution.

Comments

As the ExecCallback parameter value, specify the custom class instance implemented by the IEtlExecutionCallback interface.

Example

Executing the example requires that the repository contains a form, a button named the Button1 on the form, the UiEtlObject component named UiEtlObject1 and the EtlBox component named EtlBox1. UiEtlObject1 is selected as a data source for EtlBox1. Any ETL task is connected to UiEtlObject1.

Add a link to the ETL system assembly.

Class SAMPLEForm: Form
    UiEtlObject1: UiEtlObject;
    EtlBox1: EtlBox;
    Button1: Button;

    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    
Var
        C: EtlCallback;
    
Begin
        C := 
New EtlCallback.Create;
        EtlBox1.ExecuteTask(C);
    
End Sub Button1OnClick;
End Class SAMPLEForm;

Public Class EtlCallback: Object, IEtlExecutionCallback
    
Sub OnObject(Object: IEtlObject);
    
Begin
        Debug.WriteLine(
"Object is executed: " + Object.Id);
    
End Sub OnObject;
    
    
Sub OnProgress(Progress: Integer);
    
Begin
        Debug.WriteLine(
"Finished: " + Progress.ToString + "%");
    
End Sub OnProgress;
    
    
Sub OnSetResult(nTotalRec: Integer; nErrorRec: Integer);
    
Begin
        Debug.WriteLine(
"Total records processed: " + nTotalRec.ToString);
        Debug.WriteLine(
"Skipped records: " + nErrorRec.ToString);
    
End Sub OnSetResult;
End Class EtlCallback;

After executing the example, clicking the button starts ETL task for execution that is displayed in the EtlBox1 component. All information about task execution status will be displayed in the development environment console.

See also:

IEtlBox