public static Deserialize ( string>.Dictionary |
||
serializedValueCollection | string>.Dictionary | |
removeEntiresFromCollection | bool | |
return |
public FlowToken Execute(EntityToken entityToken, ActionToken actionToken, FlowControllerServicesContainer flowControllerServicesContainer) { MessageBoxActionNodeActionToken messageBoxActionNodeActionToken = (MessageBoxActionNodeActionToken)actionToken; MessageBoxActionNode messageBoxActionNode = (MessageBoxActionNode)ActionNode.Deserialize(messageBoxActionNodeActionToken.SerializedActionNode); IManagementConsoleMessageService managementConsoleMessageService = flowControllerServicesContainer.GetService <IManagementConsoleMessageService>(); managementConsoleMessageService.ShowMessage( messageBoxActionNode.DialogType, messageBoxActionNodeActionToken.Title, messageBoxActionNodeActionToken.Message); return(null); }
public FlowToken Execute(EntityToken entityToken, ActionToken actionToken, FlowControllerServicesContainer flowControllerServicesContainer) { CustomUrlActionNodeActionToken customUrlActionNodeActionToken = (CustomUrlActionNodeActionToken)actionToken; CustomUrlActionNode customUrlActionNode = (CustomUrlActionNode)ActionNode.Deserialize(customUrlActionNodeActionToken.SerializedActionNode); string currentConsoleId = flowControllerServicesContainer.GetService <IManagementConsoleMessageService>().CurrentConsoleId; switch (customUrlActionNode.ViewType) { case CustomUrlActionNodeViewType.DocumentView: { string viewId = Guid.NewGuid().ToString(); string serializedEntityToken = EntityTokenSerializer.Serialize(entityToken, true); OpenViewMessageQueueItem openViewMessageQueueItem = new OpenViewMessageQueueItem() { ViewId = viewId, EntityToken = serializedEntityToken, Label = customUrlActionNodeActionToken.ViewLabel, ToolTip = customUrlActionNodeActionToken.ViewToolTip, IconResourceHandle = customUrlActionNode.ViewIcon, Url = customUrlActionNodeActionToken.Url, UrlPostArguments = customUrlActionNode.PostParameters }; ConsoleMessageQueueFacade.Enqueue(openViewMessageQueueItem, currentConsoleId); BindEntityTokenToViewQueueItem bindEntityTokenToViewQueueItem = new BindEntityTokenToViewQueueItem() { ViewId = viewId, EntityToken = serializedEntityToken }; ConsoleMessageQueueFacade.Enqueue(bindEntityTokenToViewQueueItem, currentConsoleId); } break; case CustomUrlActionNodeViewType.ExternalView: { string viewId = Guid.NewGuid().ToString(); string serializedEntityToken = EntityTokenSerializer.Serialize(entityToken, true); OpenExternalViewQueueItem openExternalViewQueueItem = new OpenExternalViewQueueItem(entityToken) { ViewId = viewId, EntityToken = serializedEntityToken, Label = customUrlActionNodeActionToken.ViewLabel, ToolTip = customUrlActionNodeActionToken.ViewToolTip, IconResourceHandle = customUrlActionNode.ViewIcon, Url = customUrlActionNodeActionToken.Url, ViewType = customUrlActionNodeActionToken.ViewType, UrlPostArguments = customUrlActionNode.PostParameters }; ConsoleMessageQueueFacade.Enqueue(openExternalViewQueueItem, currentConsoleId); BindEntityTokenToViewQueueItem bindEntityTokenToViewQueueItem = new BindEntityTokenToViewQueueItem() { ViewId = viewId, EntityToken = serializedEntityToken }; ConsoleMessageQueueFacade.Enqueue(bindEntityTokenToViewQueueItem, currentConsoleId); } break; case CustomUrlActionNodeViewType.GenericView: { string viewId = Guid.NewGuid().ToString(); string serializedEntityToken = EntityTokenSerializer.Serialize(entityToken, true); OpenGenericViewQueueItem openGenericViewQueueItem = new OpenGenericViewQueueItem(entityToken) { ViewId = viewId, EntityToken = serializedEntityToken, Label = customUrlActionNodeActionToken.ViewLabel, ToolTip = customUrlActionNodeActionToken.ViewToolTip, IconResourceHandle = customUrlActionNode.ViewIcon, Url = customUrlActionNodeActionToken.Url, UrlPostArguments = customUrlActionNode.PostParameters }; ConsoleMessageQueueFacade.Enqueue(openGenericViewQueueItem, currentConsoleId); BindEntityTokenToViewQueueItem bindEntityTokenToViewQueueItem = new BindEntityTokenToViewQueueItem() { ViewId = viewId, EntityToken = serializedEntityToken }; ConsoleMessageQueueFacade.Enqueue(bindEntityTokenToViewQueueItem, currentConsoleId); } break; case CustomUrlActionNodeViewType.PageBrowser: Dictionary <string, string> arguments = new Dictionary <string, string>(); arguments.Add("URL", customUrlActionNodeActionToken.Url); OpenHandledViewMessageQueueItem openHandledViewMessageQueueItem = new OpenHandledViewMessageQueueItem( EntityTokenSerializer.Serialize(entityToken, true), "Composite.Management.Browser", arguments ); ConsoleMessageQueueFacade.Enqueue(openHandledViewMessageQueueItem, currentConsoleId); break; case CustomUrlActionNodeViewType.FileDownload: DownloadFileMessageQueueItem downloadFileMessageQueueItem = new DownloadFileMessageQueueItem(customUrlActionNodeActionToken.Url); ConsoleMessageQueueFacade.Enqueue(downloadFileMessageQueueItem, currentConsoleId); break; } return(null); }