Openning a hosted application within a workflow

Aug 28, 2010 at 7:35 PM

Hello Experts,

I could use your help again, I seem to be stuck.

I have a workflow with an if/else clause. If clause returns true, then I want a dynamic hosted application to open.

E.g If the contact is in Germany, then open dynamic hosted application 'GermanyApp' from an workflow? Also in reverse, is there anyway I can close the

Any advice would be once again appreciated.



Aug 30, 2010 at 12:54 PM


I've completed this requirement, but without using workflow.

I added an overwrite to the DesktopService class for the AddAfterSession method. In this code I launch the Dynamic App if the right conditions are met on the customer record.

        public override void AfterAddSession(bool isGlobalSession)
            if (isGlobalSession == false)
                if ((CustomerRecord)((AgentDesktopSession)SessionManager.ActiveSession).Customer.DesktopCustomer != null)
                    CustomerRecord CurrCust = (CustomerRecord)((AgentDesktopSession)SessionManager.ActiveSession).Customer.DesktopCustomer;

                    if (string.IsNullOrEmpty(CurrCust.Country) == false)
                        if(CurrCust.Country.toLower() == "germany")

Aug 30, 2010 at 4:45 PM

A few comments on this…

With UII, its always important to consider “what” your core desktop should and should not do. Meaning, the desktop is the central part in any UII solution; therefore changes to it have a much broader impact to a testing and troubleshooting.

While what you have done here works, I would suggest that you should consider putting that code into a Global or Session Hosted app which is hidden and then trigger your dynamic app open and close logic from that control. That way you can isolate changes and testing to the hosted control and affected components w/out having to factor in the rest of the desktop. Also it allows you to use variants of the hosted control to deal with Role based Requirements, rather than separate desktop installs

To the question above, CreateDynamicApplication is countered with CloseDynamicApplication

MattB - msft

Sep 1, 2010 at 9:45 AM

Thanks Matt, good advice.