AppExistsInUI , Sessions And Dynamic Applications

Mar 13, 2012 at 12:14 PM

Hi, i have a problem with Dynamic Applications & Sessions.

My CCA App , use the default Session( Global ) and another Session with a little customization to store a dataset in context.

First question: when i add second session i need to reread applications


(even if i would like to read only dynamicApp , because global are already stored in "global" session)

Is it right ? if i do not read again Applications when i try to find Dynamic Application i'm interested i found AppHost empty

or must i switch in some wat to the global session ?

Second : after doing this i'm able to see also applications in my Custom Session, but if i try to create a dynamic one

and fire action on it :

            if (!uiiDesktop.AppExistsInUI("Bing HAT"))
                uiiDesktop.CreateDynamicApplication("Bing HAT");

            if (uiiDesktop.AppExistsInUI("Bing HAT"))
                FireRequestAction(new RequestActionEventArgs("Bing HAT", "Navigate", data));
                uiiDesktop.SetFocusOnApplication("Bing HAT");

AppExistsInUI always answer false , first  at first time is correct and after i call CreateDynamicApplication , i see this application in AppHost container in my active session ( my custom session) but AppExistsInUI seems to go watch in APPUI in AgentDesktopsession ( that is empty )

i use this code into a wpf hosted control and , i can create dynamicaplication , that contains a web page , on server is configured as

global  = false
depedent on workflow = false
dynamic = true
canclose = true
show in dropdown  = false
App hosting mode  = Hosted Outside
Can someone help me or advise me on a better implementation ?

Thank you

Mar 16, 2012 at 2:56 AM

No, You should use CreateDynamicApplication(appname) on the desktop Interface.. if your in a hosted control, add the interface IDesktopUserActionsConsumer to the control and implement it.. the class it passes in will have the method CreateDynamicApplication method.

If you use the solution starters to create the hosted control, this is already setup.


AppExistsInUI is will look only at the active session, and applications that are currently in the UI.

When calling uiiDesktop.CreateDynamicApplication("Bing HAT"), check the result, true means that its either there, or is loading. False means that it could not be found or loaded.