"AppList" MFCOM Activity
The AppList activity is a sample activity based on MFCOM that retrieves the list of published applications from a XenApp 4.5 farm. The output of this activity is collection containing application objects, where each application object contains details about a published application in the farm. Since the output is a "collection" type object, you can loop through this collection within Workflow Studio using the For Each Object activity and dump the collection contents to an XML file via the ExportToXML activity. The activity plus full source code is provided in the download section below.
Downloads
Download the AppList Source Code
Setup Instructions
Since this activity is based on MFCOM, the Citrix SDK for XenApp 4.5 needs to be installed on the Workflow Studio machine in order for the activity to be used. Please note that this activity uses MFCOM v4.5 and so it should work with a XenApp 4.5 farm. It has not been tested with a XenApp 5.0 farm.
To setup and test the AppList MFCOM activity, follow the steps below on your Workflow Studio machine. The first three steps explain how to set up MFCOM. The remaining steps explain how to set up the AppList activity.
(1) Download the Citrix SDK for XenApp 4.5 (MFCOM)
(2) Install the Citrix SDK for XenApp 4.5 on your Workflow Studio machine. During the installation, select to register the remote MFCOM server. On the DCOM configuration screen, enter the name of a XenApp server in your farm to connect to. This DCOM setting is how the activity knows which XenApp server to connect to.
(3) Launch Component Services by going to Start->Programs->Administrative Tools->Component Services. Within Component Services, navigate to Component Services->Computers->My Computer and select Properties. In the "Default Properties" tab, ensure "Enable Distributed COM on this computer" is enabled and change the default impersonation level to "Impersonate".
(4) Copy applist.dll and mfcom.dll from the AppList Activity ZIP file to C:\Program Files\Citrix\Workflow Studio.
(5) Open the Workflow Studio Console and create a new workflow.
(6) The Workflow Studio Designer is now open. To add the AppList activity to the activities pane, navigate to Tools->Choose Activities from the file menu. Browse to the AppList.dll (C:\Program Files\Citrix\Workflow Studio\AppList.dll) and ensure it is selected before closing the Choose Activities dialog.
(7) Once the AppList activity is listed within the activities pane, you can drag it to the designer surface. There is no configuration of this activity. This activity knows how to connect to XenApp via the DCOM setting that was specified during the MFCOM installation. As mentioned earlier, the output of this activity is a collection object containing published application objects, so you can use other activities to loop through that collection or export the contents to XML. In the example below, I'm exporting the contents to an XML file. This XML file will list all of the published applications in the farm along with a selection of their various properties.
(8) A sample XML output is shown below. The AppName attribute is the published application name. The InitialProgram attribute is the executable path for launching the application. Several other attributes of the published application are provided as well.
Disclaimer
These software applications are provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.
Add Comment