ShowExecutionOrder Command

Purpose

It opens the dialog box that is used to set up operation execution order in an ETL task.

Parameters of Use

Command parameters are passed in the Data property. Executing the command requires to specify the following value in this property:

Value type Description
IEtlTask The ETL task, for which operation execution order must be set up.

Application Features

The command can be used only for ETL tasks. The specified task must be opened for edit. Executing the command shows logical True if the OK button is clicked, and logical False if the Cancel button is clicked.

Fore Example

Executing the example requires that the repository contains an ETL task with the ETL identifier. Some import/export/data transformation chains are implemented in the task. Add links to the ETL, Metabase and Ui system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    ETL: IEtlTask;
    CommandTarget: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
    Result: Boolean;
Begin
    MB := MetabaseClass.Active;
    ETL := MB.ItemById("ETL").Edit As IEtlTask;
    CommandTarget := WinApplication.Instance.GetPluginTarget("Etl");
    Context := CommandTarget.CreateExecutionContext;
    Context.Data := ETL;
    Result := CommandTarget.Execute("ShowExecutionOrder", Context);
    If Result Then
        (Etl As IMetabaseObject).Save;
    End If;
End Sub UserProc;

After executing the example the dialog box that is used to set up operation execution order in ETL task opens. If some changes are made in the dialog box and the OK button is clicked, all changes are saved.

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;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Ui;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    ETL: IEtlTask;
    WinApp: WinApplication = New WinApplicationClass_2();
    CommandTarget: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
    Result: Boolean;
Begin
    MB := Params.Metabase;
    ETL := MB.ItemById["ETL"].Edit() As IEtlTask;
    CommandTarget := WinApp.GetPluginTarget("Etl");
    Context := CommandTarget.CreateExecutionContext();
    Context.Data := ETL;
    Result := CommandTarget.Execute("ShowExecutionOrder", Context, NullAs Boolean;
    If Result Then
        (Etl As IMetabaseObject).Save();
    End If;
End Sub;

See also:

IUiCommandTarget.Execute