IEtlCodeBlock.Module

Fore Syntax

Module: IMetabaseObjectDescriptor;

Fore.NET Syntax

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

Description

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

Comments

Description of repository module, form, assembly, .NET assembly can be specified as the property value.

Fore 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.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Etl;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Task: IEtlTask;
    ProcedureObj: IEtlCodeBlock;
    WxConsumer: IWxRectangle;
    WxETLConsumer: IWxEtlObject = New WxEtlObjectClass();
    Point: GxPointF = New GxPointFClass();
Begin
    MB := Params.Metabase;

    Task := MB.ItemById["OBJ_ETL"].Edit() As IEtlTask;
     //Create the Procedure object
    ProcedureObj := Task.Create(EtlObjectType.eotCodeBlock) 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.EtlObject := ProcedureObj;
    WxConsumer.Style.TextPosition := WxTextPosition.wtpBottom;
    WxConsumer.Style.PictureMarginTop := -10;
    Point.Create(5050);
    WxConsumer.PinPosition := Point;
    WxConsumer.Extension := WxETLConsumer As IWxShapeExtension;
     //End of creating a visual object
     //Save ETL task
    (Task As IMetabaseObject).Save();
End Sub;

See also:

IEtlCodeBlock