if (HermesBrowser.getBrowser().getBrowserTree().getLastSelectedHermesTreeNode() != null)
{
final MessageStoreBrowserAction storeAction = (MessageStoreBrowserAction) browserAction;
final MessageFactory messageFactory = HermesBrowser.getBrowser().getBrowserTree().getLastSelectedHermesTreeNode().getHermes();
HermesBrowser.getBrowser().getThreadPool()
.invokeLater(new AddToMessageStoreTask(messageFactory, storeAction.getMessageStore(), xml));
}
else
{
HermesBrowser.getBrowser().showErrorDialog("A session must be selected to use as a factory for the messages") ;
}