/// <summary> /// Executes the HAT leaf associated method. /// </summary> /// <param name="sender">Sender object.</param> /// <param name="e">TriggerEventArgs.</param> public void Execute(object sender, TriggerEventArgs e) { try { // Create exchange information. ExchangeInfoAction lExchangeInfo = new ExchangeInfoAction(this.ClassIUName, this.IUName, NavigationalFilteringIdentity, null, null); // Launch scenario. ScenarioManager.LaunchActionScenario(lExchangeInfo, null); } catch (Exception err) { ScenarioManager.LaunchErrorScenario(err); } }
/// <summary> /// Executes the Action Item. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">TriggerEventArgs</param> public void Execute(object sender, TriggerEventArgs e) { try { // Validate if there are pending changes in the interaction unit // which contains the action item. CheckForPendingChangesEventArgs eventArg = new CheckForPendingChangesEventArgs(); OnBeforeExecute(eventArg); if (eventArg.Cancel) { return; } ContextRequiredEventArgs contextEventArgs = new ContextRequiredEventArgs(); OnContextRequired(contextEventArgs); SelectedInstancesRequiredEventArgs lSelectedInstancesEventArgs = new SelectedInstancesRequiredEventArgs(); OnSelectedInstancesRequired(lSelectedInstancesEventArgs); ExchangeInfoAction lExchangeInfoAction = null; if (this.IsNavigationalFilter) { lExchangeInfoAction = new ExchangeInfoAction(ClassIUName, IUName, NavigationalFilteringIdentity, lSelectedInstancesEventArgs.SelectedInstances, contextEventArgs.Context); } else { lExchangeInfoAction = new ExchangeInfoAction(ClassIUName, IUName, lSelectedInstancesEventArgs.SelectedInstances, contextEventArgs.Context); } // Set default order criteria lExchangeInfoAction.DefaultOrderCriteria = DefaultOrderCriteria; // Raise the event Launching Scenario. LaunchingScenarioEventArgs lLaunchScenarioArgs = new LaunchingScenarioEventArgs(lExchangeInfoAction); OnLaunchingScenario(lLaunchScenarioArgs); // Launch scenario. ScenarioManager.LaunchActionScenario(lExchangeInfoAction, this); } catch (Exception err) { ScenarioManager.LaunchErrorScenario(err); } }