I have this message coming up (in vba) when Designer is importing a universe and again later when it is exporting it. The message is:
Server Busy
This action cannot be completed because the other program is busy. Choose “Switch To” to activate the busy program and correct the problem.
But there is no problem. The action in Designer is just taking a while. I don’t want my users to have to keep hitting “Retry”. Is there any way to suppress this message? Application.Interactive=False doesn’t do it.
I have a script that imports a universe adds a few classes and objects, then exports the universe. I received the server busy message several times during the script’s execution.
I determined that it was occuring during the import, export, and it would happen for a few calls to parse (as I added an object I would parse it) the object. Basically any designer operation that took too long to complete. It seems to give the OS the impression that the app i[/i] is “Not Responding”.
I solved the parse issue by using the CheckIntegrity method. I also found that closing other open applications and executing both the client (Reporter) app and the server (Designer) app with the Interactive property equal to false very helpful in avoiding the “Server Busy” message. However that is a semi-effective workaround and not a solution to the problem.
I also read a very helpful piece of text in the VBA Developer’s handbook concerning In-Process vs. Out-of-Process Servers:
According to this quote, Designer is the out-of-process server. I believe that I need to create a COM DLL for designer in VB or VBScript perhaps. I am not sure how to do this just yet, any suggestions would be greatly appreciated.
The first “Server Busy” message occurs during the import method and it will also occur during export. I do make sure that there are no designer.exe processes running before I kick off the script. I find that if I close all open windows applications, that it is less likely for the annoying message to pop up.
Sub Create_Des_Objs()
Dim objDes As Designer.Application
Dim ObjUnv As Designer.Universe
'
' More object definitions here
'
On Error GoTo HandleError
Set objDes = New Designer.Application
'Login to database
WriteToLogRpt Format(Now, "yyyymmdd hh:mm:ss") & Chr(9) & _
"Open Designer Server Application."
Call objDes.LoginAs(strUser, strPass, False)
objDes.Application.Visible = False
objDes.Application.Interactive = False
'Unv should be in the 1st domain. Prompt user if not found.
UnvDomain = objDes.UniverseDomains.Item(1).Name
varUnvDomain = InputBox("Please provide the universe domain name if it " & _
"is not the same as below:", _
"Retrieve Universe from Repository", _
UnvDomain)
If varUnvDomain = vbCancel Then
RC = 1
IntObjCount = 0
GoTo CloseConnection
End If
UnvDomain = varUnvDomain
UnvGroup = objDes.UniverseDomains.Item(UnvDomain).Users(1).Name
UnvDir = objDes.GetInstallDirectory(dsUniverseDirectory)
'Import Universe
WriteToLogRpt Format(Now, "yyyymmdd hh:mm:ss") & Chr(9) & _
"Import " & UnvName & " from the " & UnvDomain & " domain."
Call objDes.Universes.Import(UnvDomain, UnvName)
'
' More code here (adding classes and objects)
' Could range anywhere from 1 to 1000 objects
'
'Save and export Universe
WriteToLogRpt Format(Now, "yyyymmdd hh:mm:ss") & Chr(9) & _
"Save and close " & UnvName & " universe."
ObjUnv.Save
ObjUnv.Close 'Univ must be closed before export
objDes.Universes.Export UnvDomain, _
UnvGroup, _
UnvDir & "\" & UnvDomain & "\" & UnvName
WriteToLogRpt Format(Now, "yyyymmdd hh:mm:ss") & Chr(9) & _
UnvName & " successfully exported."
CloseConnection:
On Error Resume Next
WriteToLogRpt Format(Now, "yyyymmdd hh:mm:ss") & Chr(9) & _
"Close Designer Server Application."
Set ObjCurrUDFCls = Nothing
Set ObjUDFRootCls = Nothing
ObjUnv.Close
Set ObjUnv = Nothing
objDes.Application.Interactive = True
objDes.Quit
Set objDes = Nothing
Exit Sub
HandleError:
' Error Logic
End Sub
Just to follow up, I submitted a case with BO support that basically reitterated the VBA Developer’s handbook notes about this type of process:
If I run this script in Reporter (no matter the properties of ‘visible’ or ‘interactive’), any click on the BO report or the code will set off the warning. When Reporter and Designer are not visible, any click on other applications in the task bar or start menu may trigger the warning too. If you notice when you click the ‘switch to’ button on the warning (and the apps are invisible), the task bar will become active.
The only way to truly avoid this is to make the VBA code into a VB Executable which the code will run in the background.
With Visual Basic of course. Visual Basic is one of Microsoft’s stand-alone programming languages, purchased separately. This is not to be confused with VBA (Visual Basic for Applications) which is embedded in another application (like Excel, or BusinessObjects).
Just thought that I would share my experience with this issue. My team has built an application to dynamically manipulate the universe using designer. (This is BO XI R2.) We would often get the server busy error message when there was something on the clipboard. Most of the time it was the MS Office clipboard (i.e. copying something from one .doc to another) but it could just being as simple as having copied and pasted something (either text or a file). The “server busy” generally didn’t happen when we were in debug mode (VS 2005). We found that the best thing to do was make sure that all Office apps were closed and the the Windows clipboard was empty when we ran our compiled code. If we were running our code on a remote machine via Remote Desktop, we also had to kill rdpclip on the remote machine. I hope this is useful.
K
PS to clear the Windows clipboard go to Start > Run and type clipbrd. This launches the clipboard viewer and will let you clear the clipboard.
We had a similar issue when trying to manipulate Excel from Bob [don’t ask why]
Business Objects support advised that because Desktop Intelligence now connects to the CMC rather than being standalone, it needs to ping the CMC every few seconds.
If you can break the script down into calls that last less than 10 seconds, you can get away with it. Otherwise no go.
They were adamant that there is no possibility of any change but hey, if there is pressure from other areas, you never know …