IEtlCodeBlock.Module

Syntax

Module: IMetabaseObjectDescriptor;

Description

The Module property determines description of the development environment object that contains implementation of the executed procedure or function.

Comments

As a property value, one should specify description of a repository unit, form, assembly.

Example

Executing the example requires that the repository contains an ETL task with the OBJ_ETL identifier, and the ETL_Module unit. The RunExport procedure is implemented in the unit. Add links to the Andy, Drawing, Etl, Metabase system assemblies.

Sub CreateCodeBlock;
Var
    MB: IMetabase;
    Task: IEtlTask;
    ProcedureObj: IEtlCodeBlock;
    WxConsumer: IWxRectangle;
    WxETLConsumer: IWxEtlObject;
Begin
    MB := MetabaseClass.Active;
    Task := MB.ItemById("OBJ_ETL").Edit As IEtlTask;
     //Create the Procedure object
    ProcedureObj := Task.Create(EtlObjectType.CodeBlock) As IEtlCodeBlock;
    ProcedureObj := ProcedureObj.Edit;

     //Set up parameters
    ProcedureObj.Module := MB.ItemById("ETL_Module");
    ProcedureObj.Procedure := "RunExport";
     //Save the Procedure object
    ProcedureObj.Save;
     //Start of creating a visual object
    WxConsumer := Task.Workspace.CreateRectangle;
    WxETLConsumer := New WxEtlObject.Create;

    WxETLConsumer.EtlObject := ProcedureObj;
    WxConsumer.Style.TextPosition := WxTextPosition.Bottom;
    WxConsumer.Style.PictureMarginTop := -10;
    WxConsumer.PinPosition := New GxPointF.Create(5050);
    WxConsumer.Extension := WxETLConsumer As IWxShapeExtension;
     //End of creating a visual object
     //Save ETL task
    (Task As IMetabaseObject).Save;
End Sub CreateCodeBlock;

Executing the example creates a new object that starts the procedure. Parameters required for execution are set up for the object: the unit of started procedure is specified.

See also:

IEtlCodeBlock