Opens the dialog box that is used to set up operation execution order in an ETL task.
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. |
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.
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.
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, Null) As Boolean;
If Result Then
(Etl As IMetabaseObject).Save();
End If;
End Sub;
See also: