• View Communities
    • Citrix Developer Network
      The place for unfiltered straight talk on Citrix products. Blogs, code downloads, best practices, APIs, and more can all be found here.
    • Citrix Ready Community Verified
      Does it work with Citrix? Application compatibility questions are a thing of the past with the new Citrix Community Verified site.
    • Blogs
      Learn the latest from the Citrix employees who are building application delivery infrastructure technologies.
    • Blogosphere
      The Citrix Blogosphere is a window into the thousands of conversations taking place about Citrix and Application Delivery.
  •  Sign In
The Citrix Blog
Blogs for tag 'workflow-studio'

Permalink | Twitter Post to Twitter | Comments (0) | Views (655) |

posted by Peter Schulz

The Citrix Workflow Studio Evaluation Virtual Appliance (EVA) is now available. This EVA provides you with 30 days to evaluate a pre-configured virtual machine running Windows Server 2008 that has Workflow Studio 2.0 already installed and configured with all activity libraries and the sample workflows from CDN. Download the EVA and review the Getting Started guide .

If you have any questions leave a comment or contact me directly

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (0) | Views (1902) |

posted by Peter Schulz

I started a video series on CitrixTV for tips & tricks for working with Workflow Studio. The first video is an explanation of how to use the If/Else activity and conditional logic in your workflows. I'll be posting more videos to the series over time, so if there is something you would like to know how to do then leave feedback in comments or email me directly and I will try to address it.

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (0) | Views (1210) |

posted by Peter Schulz

There are some new articles posted on the Workflow Studio section of CDN. These will probably only be of interest to the developers and advanced workflow gurus out there, but I found them interesting and wanted to share (yes, I am a geek )

Keep in mind that most of the CDN sections for Workflow Studio are open to the general public to post and edit (be sure to share your workflows and activity libraries). The tips and tricks article was intentionally left open to all to edit - come on in and share. Make sure you bookmark the articles section, add it to your RSS reader, or just click on the Community tab from within Workflow Studio every time you open it.

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (1) | Views (1389) |

posted by Peter Schulz

We have posted some initial XenApp workflows that demonstrate the capabilities in the new XenApp activity library. You can use these workflows to backup applications on your farm and then restore them to specific servers in your farm. These workflows are useful for backup purposes and also can aid in migrating applications between farms (e.g. QA to production).

XenApp-Backup Applications
XenApp-Restore Applications to Server

As always feel free to leave feedback in comments or email me directly.




Learn more about Citrix XenApp 5 Feature Pack 2

Follow XenApp on | | |

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (2) | Views (1392) |

posted by Peter Schulz

With Workflow Studio 2.0 we officially support 8 different OS platforms (all on the latest service pack only):

  • Windows XP x86
  • Windows XP x64
  • Windows Vista x86
  • Windows Vista x64
  • Windows Server 2003 R2 x86
  • Windows Server 2003 R2 x64
  • Windows Server 2008 x86
  • Windows Server 2008 x64

We don't stop you from installing on unsupported platforms and the chances are pretty good that everything will work just fine. However, we know that everyone wants to use their product in a fully supported environment. As we plan for the next release, Windows 7 and Windows Server 2008 R2 will be available. To make sure we make the right decisions on which platforms we officially support I would like to get your feedback.

Please take the polls below to let us know which platform(s) you want to be able to use Workflow Studio with and whether you need 32-bit support only, 64-bit support only, or both:

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (0) | Views (1556) |

posted by Peter Schulz

Alessandro over at virtualization.info commented that we need to do a better job communicating the value and capabilities of Workflow Studio:
http://www.virtualization.info/2009/09/release-citrix-workflow-studio-20.html

I have to admit, I have been focused on talking about the new version and features (I'm excited about them.) There are lots of places though where we do talk about the capabilities that Workflow Studio enables for our customers:

On the main product page for Workflow Studio we cover the 5 use cases that customers typically use Workflow Studio for:

  1. Power management - Reduce power consumption in the datacenter.
  2. User provisioning - Automate the process of provisioning users.
  3. Dynamic resource allocation - Detect changes in user traffic patterns and automatically re-configure server resources for on-demand access.
  4. Disaster recovery - Automate failover and recovery procedures.
  5. Product automation - Automate repetitive tasks and ensure best practices are followed.

I am also taking each of the bullets from the original post announcing the availability of Workflow Studio 2.0 and going into more detail. I just posted Automate XenApp with Workflow Studio where I talk about some of the use cases that we based the new XenApp libraries on. I will have some sample workflows posted with video tutorials as well.

I wrote The Three Audiences of Workflow Studio back in February, but it is still just as relevant with the current version of Workflow Studio. 'Scripting guys' and developers will find a lot to like in Workflow Studio, but you don't need to be one to benefit from Workflow Studio. The drag-and-drop interface and standard way of accessing all the Citrix product APIs (as well as PowerShell, Windows, WMI, etc.) opens up access to a much broader range of people.

The Workflow Studio 2.0 Video Tutorial Series provides an introduction, an architectural overview, and an installation/configuration guide for getting started and should help save you time as you consider how to deploy Workflow Studio.

Also, I want to clarify the availability of Workflow Studio as an anonymous comment left there indicates there may be some confusion. Workflow Studio is included as part of ALL editions of the Citrix Delivery Center products - not just Platinum. Workflow Studio comes with all of the below:

  • XenApp Advanced, Enterprise, or Platinum edition
  • XenDesktop Standard, Advanced, Enterprise, or Platinum edition
  • NetScaler Standard, Enterprise, or Platinum edition
  • Essentials for XenServer Enterprise and Platinum editions
  • Essentials for Hyper-V Enterprise and Platinum editions

As always leave me your feedback in the comments or email me directly...

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (0) | Views (1771) |

posted by Peter Schulz

In a previous post announcing the availability of Workflow Studio 2.0 I listed the new features that are available. Here is a closer look at the first feature mentioned:

Native XenApp activity libraries

With the 2.0 release of Workflow Studio, we now include 18 activities for managing application virtualization scenarios with XenApp. These activities provide access to your XenApp farm, servers, applications, and even sessions.

These 18 activities were designed around two key use cases:

  1. Backup/Restore of applications - By providing access to retrieve current published applications as well as publishing new applications, these activities provide the ability to do automated configuration backups, QA to Production migrations, and help automate version upgrades. View sample workflows that address this use case for backup and restore.
  2. Manage logons - Many customers expressed the need to be able to automatically manage access to their XenApp servers. We also received feedback that the way customers most often manage logons is through the use of customized load evaluator rules. We included activities that help manage logons for automated maintenance of XenApp servers.

These activities are installed by the activity library installer and leverage the new Commands for PowerShell to interface with XenApp. Everything you need to build a XenApp workflow is included in the installer, but to run the workflow you will need to meet two requirements:

  1. You must install either Workflow Studio or a Runtime on a XenApp server in your farm as these commands do not support remote connections. The XenApp server you install it on just needs to be a member of the farm and does not need to be serving applications.
  2. These activities only support XenApp 4.5 HRP3 and later. If you need access to prior versions of XenApp, you will need to use MFCOM. More information on how to use Workflow Studio with MFCOM is available in this Workflow Studio SDK MFCOM example.

Keep in mind that we also support native activities that run VBScript and PowerShell scripts. If there is something missing from our activity libraries that you want to automate you may be able to do so through a script and not actually need a native activity for a given task.

The Workflow Studio 2.0 Video Tutorial Series provides an introduction, an architectural overview, and an installation/configuration guide for getting started and should help save you time as you consider how to deploy Workflow Studio.

I'm sure our customers and partners will find other unique use cases. Feel free to leave feedback in comments or email me directly to let me know what you are doing with the product (or what you would like to be able to do.)

Workflow Studio is included with XenApp Feature Pack 2

Learn more about Citrix XenApp 5 Feature Pack 2

Follow XenApp on | | |

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (1) | Views (1613) |

posted by Peter Schulz

I posted the first 3 videos for the Workflow Studio 2.0 video tutorial series on CitrixTV:

  1. Getting Started with Workflow Studio 2.0
  2. Workflow Studio 2.0 Architecture and Components
  3. Installing and Configuring Workflow Studio 2.0

You can access the series and watch them all in a playlist format from here:
http://www.citrix.com/tv/series/109

I plan to add some more video tutorials to this series and also plan to do a series that explores the new features in 2.0 specifically. Let me know what you think and what other topics you want me to cover...

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (0) | Views (2520) |

posted by Peter Schulz

I'm pleased to announce that Workflow Studio 2.0 is now available:

Download Workflow Studio 2.0 (MyCitrix login required)

This release has a number of great new features and is a seamless upgrade from version 1.x. Here are some of the key new features:

  • Native XenApp activity libraries (and many other additional activities)
  • Remote runtimes
  • Simplified management interface
  • Enhanced security features
  • Simplified installation and configuration
  • Improved SDK
  • Simplified workflow Designer
  • Globalization support

I will post some more blogs over the next few days with more details on the above features and will also be updating the CDN site with many new articles, so subscribe to the Workflow Studio blog and head over to the Workflow Studio CDN site and subscribe for updates on CDN as well.

Feel free to leave feedback in comments or email me directly.

Workflow Studio will be included with XenApp Feature Pack 2

Learn more about Citrix XenApp 5 Feature Pack 2

Follow XenApp on | | |

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (0) | Views (2585) |

posted by Barry Flanagan




In this section of the StorageLink Step by Step Series, Steve takes you through how to create Hyper-V virtual machines from storage templates.









In Part 1, Steve Umbehocker reviewed the installation of the StorageLink component of Citrix Essentials for Hyper-V. In Part 2, Steve reviewed the initial configuration of StorageLink after it has been installed. In Part 3 of the StorageLink Step by Step Series, Steve covers connecting to Storage Systems via the StorageLink Manager console. In Part 4, he covers how to create storage repositories (SRs) with the StorageLink console.

Express Edition Download
http://www.citrix.com/ehvexpress

StorageLink Deep Dive Webinar - http://community.citrix.com/blogs/citrite/barryf/2009/04/13/StorageLink+-+Essentials+for+Hyper-V+Deep+Dive+Webinar

StorageLink Demo Videos
http://www.citrix.com/ehv

StorageLink Overview - http://community.citrix.com/blogs/citrite/barryf/2009/02/23/StorageLink+in+Essentials+for+Hyper-V

Provisoning Services Overview - http://community.citrix.com/blogs/citrite/barryf/2009/03/20/Provisioning+for+Hyper-V+with+Citrix+Essentials

Lab Manager Overview - http://community.citrix.com/blogs/citrite/barryf/2009/03/19/Essentials+for+Hyper-V+with+Lab+Management

StorageLink Install Install Guide - http://support.citrix.com/article/CTX120789
StorageLink User Guide - http://support.citrix.com/article/CTX120791



Follow me on Twitter.

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (0) | Views (2418) |

posted by Barry Flanagan




In this installment of the StorageLink Step by Step Series, Steve Umbehocker covers how to create storage repositories (SRs) with the StorageLink console.









In Part 1, Steve Umbehocker reviewed the installation of the StorageLink component of Citrix Essentials for Hyper-V. In Part 2, Steve reviewed the initial configuration of StorageLink after it has been installed. In Part 3 of the StorageLink Step by Step Series, Steve Umbehocker covers connecting to Storage Systems via the StorageLink Manager console.

Express Edition Download
http://www.citrix.com/ehvexpress

StorageLink Deep Dive Webinar - http://community.citrix.com/blogs/citrite/barryf/2009/04/13/StorageLink+-+Essentials+for+Hyper-V+Deep+Dive+Webinar

StorageLink Demo Videos
http://www.citrix.com/ehv

StorageLink Overview - http://community.citrix.com/blogs/citrite/barryf/2009/02/23/StorageLink+in+Essentials+for+Hyper-V

Provisoning Services Overview - http://community.citrix.com/blogs/citrite/barryf/2009/03/20/Provisioning+for+Hyper-V+with+Citrix+Essentials

Lab Manager Overview - http://community.citrix.com/blogs/citrite/barryf/2009/03/19/Essentials+for+Hyper-V+with+Lab+Management

StorageLink Install Install Guide - http://support.citrix.com/article/CTX120789
StorageLink User Guide - http://support.citrix.com/article/CTX120791



Follow me on Twitter.

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (0) | Views (1382) |

posted by Peter Schulz

The Workflow Studio community site is the place to find information on all things Workflow Studio. Did you know that most of the site is also open for community contributions as well? Here is a brief overview of the sections of the site that are open for the community:

  • Articles This section of the site is where you will find articles provided by the Workflow Studio product team as well as community contributed articles. Articles will typically be overviews, technical tips/tricks, how-to guides, etc.
  • Activity Libraries This is where you will find all the activity libraries provided by the community. There are already some interesting ones out there from other internal groups at Citrix like the SQL Server one that Ed posted (along with the source code if you want to extend it) and the AG Standard Edition library provided by Audra.
  • Workflows Here you will find workflows created by the community. Make sure you check the activity library requirements for a workflow and download the activity libraries first if required.
  • Forums The forums section is for general conversation about the product, workflow development, activity library development, feature requests, etc. If you have a support question there is a dedicated support forum as well.

The main community page is also available inside Workflow Studio on the Community tab. You will also find a built-in reader for the Blogs, Workflows, and Activity Libraries sections of the site that allows you to easily search and download workflows and activity libraries right in the product.

Make sure you check each of these areas to see what is available, but I also encourage you to post your own articles, activity libraries, workflows, and questions. Don't be shy...

If anyone has any comments on the community site please post them below...

Pete

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (0) | Views (2533) |

posted by Barry Flanagan




In this installment of the StorageLink Step by Step Series, Steve Umbehocker covers connecting to Storage Systems via the StorageLink Manager console.









In Part 1, Steve Umbehocker reviewed the installation of the StorageLink component of Citrix Essentials for Hyper-V. In Part 2, Steve reviewed the initial configuration of StorageLink after it has been installed.

Express Edition Download
http://www.citrix.com/ehvexpress

StorageLink Deep Dive Webinar - http://community.citrix.com/blogs/citrite/barryf/2009/04/13/StorageLink+-+Essentials+for+Hyper-V+Deep+Dive+Webinar

StorageLink Demo Videos
http://www.citrix.com/ehv

StorageLink Overview - http://community.citrix.com/blogs/citrite/barryf/2009/02/23/StorageLink+in+Essentials+for+Hyper-V

Provisoning Services Overview - http://community.citrix.com/blogs/citrite/barryf/2009/03/20/Provisioning+for+Hyper-V+with+Citrix+Essentials

Lab Manager Overview - http://community.citrix.com/blogs/citrite/barryf/2009/03/19/Essentials+for+Hyper-V+with+Lab+Management

StorageLink Install Install Guide - http://support.citrix.com/article/CTX120789
StorageLink User Guide - http://support.citrix.com/article/CTX120791



Follow me on Twitter.

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (0) | Views (2287) |

posted by Audra Kalfass

I posted a guide on how to create an MSI installer for your Workflow Studio Activity Library. By creating an installer, you will eliminate all manual installation steps for your users. Please utilize this guide to create easily installable Activity Libraries for users. WiX is the tool used, which is fun and easy to use. Please let me know if you run into any issues with this guide.

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (0) | Views (1739) |

posted by Audra Kalfass

Last Week, I posted a new Activity Library for Access Gateway SE. It's really easy to install, just download Citrix Access Gateway Std Activity Library, run it, and you're good to go. The Citrix Access Gateway folder will appear in your WFS environment, with all activities ready for use:

This library was built to help with user provisioning and group policy management. You can find more information about each activity, proposed workflows, and tips for the library here.

I have also posted a couple of example workflows, available for download here and here.

I hope you enjoy using these tools, if you feel there is an activity/workflow that you would like to have that is not included in this set, please let us know! We are always looking for new ideas and expanding the functionality of what Citrix provides. Thanks!

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (1) | Views (3252) |

posted by David McGeough

I'm pleased to announce that we have just released a new version of the Brief Troubleshooting Guide (BTG) via the Knowledge Center.
http://support.citrix.com/article/ctx106727

For those of you unaware, the Brief Troubleshooting Guide is intended as the first resource for Citrix Administrators/Engineers to troubleshooting technical issues for all Citrix products/technologies. The BTG gives guidance on where to start if a Citrix Administrator/Engineer is not very familiar with the product. The BTG is not in any way supposed to be comprehensive, but will help you gather the right information quickly, allowing YOU and Citrix Technical Support to resolve your issue promptly.

This release of the BTG is Bigger, Better and Bursting with new ways to help you troubleshoot all Citrix products.
All sections of the BTG were completely overhauled and lots of new products were added, for example:

• Citrix Offline App Plug-in
• Citrix Receiver for Windows
• Citrix XenServer
• Citrix Repeater Client
• Command Center
• EdgeSight for NetScaler
• EdgeSight for Load Testing
• Citrix User Profile Manager
• Citrix EasyCall
• Provisioning Services for Datacenters and Desktops
• Workflow Studio

Please download the latest BTG from http://support.citrix.com/article/ctx106727
For feedback, suggestions, corrections - BTG@citrix.com

David
Twitter: citrixreadiness

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (1) | Views (5620) |

posted by Barry Flanagan






There is a new Express Edition of Citrix Essentials for Hyper-V, and it is FREE! Now you can quickly and easily combine the power of Hyper-V- System Center Virtual Machine Manager and Essentials for Hyper-V Express Edition.

http://citrix.com/ehvexpress

Citrix Systems, Inc. is unveiling a new free Express Edition to its Citrix Essentials for Microsoft Hyper-V lineup. The new Express Edition is immediately available for download and includes the game-changing Citrix StorageLink technology. With StorageLink, Windows administrators can dramatically simplify their storage management processes with quick and easy storage configuration and provisioning for their Windows Server 2008 Hyper-V and System Center virtual infrastructures. Citrix Essentials helps administrators take full advantage of powerful storage-based features like deduplication, thin provisioning, cloning, snapshots and replication - features that otherwise hide behind layers of proprietary, specialized virtualization storage file systems.

The new free Express Edition of Citrix Essentials for Hyper-V is designed specifically for Windows IT professional in the early phases of Hyper-V adoption. It will allow them to take advantage of the benefits of shared storage with Hyper-V and simplify storage management in virtual server environments.
The StorageLink technology featured in all editions of Citrix Essentials for Hyper-V provides Windows IT Professionals with the tools necessary to easily manage Hyper-V storage in iSCSI and Fibre Channel (FC) SAN environments, enabling them to leverage advanced storage technologies from leading storage vendors that deliver powerful features for performance, storage efficiency, and business continuity. Industry estimates have shown that by applying storage-saving technologies like deduplication and thin provisioning , Hyper-V customers can often shrink their storage footprint by upwards of 50 percent depending on the nature of their workloads. In cases where virtual machines (VMs) are highly duplicated, like virtual desktop images, many have seen a nearly 90 percent reduction in storage consumption.

The Express Edition of Citrix Essentials for Hyper-V supports up to two Hyper-V servers and one storage array. Organizations that download the free Express Edition of Citrix Essentials for Hyper-V can easily upgrade to the Enterprise or Platinum Editions. Listed at $1500 and $3000 per server, respectively, the Enterprise and Platinum Editions add dynamic server provisioning, automated lab management, automated stage management, and workflow orchestration.







Of course, Express Edition provides just a small sampling of what is possible to achieve with Citrix Essentials for Hyper-V. The Enterprise Edition includes the full version of StorageLink, Dynamic Provisioning Services for Server Operating Systems, and complete WorkFlow Orchestration.

The Platinum Edition of Citrix Essentials for Hyper-V adds in Lab Manager to provide a complete cost effective virtual lab solution, and Stage Manager to automate the process of migrating newly tested and verified configurations from the virtual lab directly into production. You can download a evaluation copy of the Platinum Edition of Citrix Essentials for Hyper-V at http://www.citrix.com/ehv.

Express Edition Download
http://www.citrix.com/ehvexpress

StorageLink Deep Dive Webinar - http://community.citrix.com/blogs/citrite/barryf/2009/04/13/StorageLink+-+Essentials+for+Hyper-V+Deep+Dive+Webinar

StorageLink Demo Videos
http://www.citrix.com/ehv

StorageLink Overview - http://community.citrix.com/blogs/citrite/barryf/2009/02/23/StorageLink+in+Essentials+for+Hyper-V

Provisoning Services Overview - http://community.citrix.com/blogs/citrite/barryf/2009/03/20/Provisioning+for+Hyper-V+with+Citrix+Essentials

Lab Manager Overview - http://community.citrix.com/blogs/citrite/barryf/2009/03/19/Essentials+for+Hyper-V+with+Lab+Management

StorageLink Install Install Guide - http://support.citrix.com/article/CTX120789
StorageLink User Guide - http://support.citrix.com/article/CTX120791



Follow me on Twitter.

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (0) | Views (2685) |

posted by Ed York

One of the most common questions I've heard on Workflow Studio is how you can initiate the execution of workflows from an ASP.NET web page.  The web is a great platform for delivering applications to end-users, and more and more applications are being delivered by a web browser each day.  How cool would it be to kick off a workflow within Workflow Studio based on a user-action performed inside a web application?  In this blog I'm going to show you how to do it and I'll give you the tools to customize this further to meet the needs of your application.

Example Usage
Before I go into the details about how the sample web application works, I want to quickly provide an example of why you may want kick off workflow execution from a web page.  As you think about your business, ask yourself what it takes to get a new hire set up with new credentials across all of the systems in your environment.  You need an Active Directory account, application accounts, HR accounts, credentials supplied to your single sign-on solution, etc. 

To accommodate this scenario, you can build a web page that presents a form to an admin to gather details about a new user, what groups they should belong to, and what applications/resources they need to access.  This web page can call a workflow within Workflow Studio passing in the details about the user, and the workflow can automate the provisioning of the Active Directory account and application accounts across various systems.  That's a pretty powerful system and would greatly simplify a lot of the complexities for performing those actions manually.  Building that type of workflow might take some custom development effort, but Workflow Studio 1.1 already provides activities for provisioning user accounts in Active Directory to help get you started.

ASP.NET Web Application Overview
The sample web application that I'm providing here is functionally equivalent to the sample Windows application that I provided in the last blog.  To compare and contrast the differences between automating workflows with a Windows and Web application, I wanted to keep the functionality and UI mainly the same.  The web version of the application is shown below.


I describe my adventures for coding this application in the bottom of this article.  To sum up, this application really has two parts.  You have the ASP.NET application that contains the ASPX page and code-behind page.  You also have a COM object that you need to install inside Component Services. (I have steps for doing all this below). 

When you click the Execute Workflow button inside the web page, the ASPX page gathers what workflow you are executing and what runtime it is deployed on.  It then calls the COM object to actually execute the workflow.  The COM object uses the Workflow Studio Powershell cmdlets for communicating with Workflow Studio.  I was getting security issues when I tried to run those functions within the context of IIS.  By creating a COM object and placing that object within Component Services, I was able to overcome the issues I was having. 

For more information on how this application works, feel free to check out the previous article of this blog series.  I described in great detail how the Windows version of this application functions, so I'll refer you to that article for the extra details.  For more information on why I needed to build the COM object, refer to the Lessons Learned section at the bottom of this article.

Downloads:
Download the ASP.NET web application IIS files
Download the ASP.NET web application source code

Prereqs for using the ASP.NET application:
Before you set up this web application on your Workflow Studio machine, you will need to have the following installed and/or configured beforehand:

  • Workflow Studio 1.1
  • Powershell 1.0
  • IIS installed with ASP.NET enabled
  • IIS configured with the ASP.NET v2.0.50727 web service extension set to Allowed
  • Determine or specify an account within the Workflow Studio Console for executing the workflows.  This is done within the Security section.
  • Pre-deploy the Workflow you want to execute within the Workflow Studio Console.  See Part 1 of this blog series for more information.

Setting up the ASP.NET application:
To set up this sample web application, follow the steps in the sections below.

Application Setup

  • Copy the IIS files from the ZIP above to C:\Citrix (or any accessible location on your Workflow Studio machine)
  • Update the web.config file with the appropriate impersonation account.  This account should have permissions to execute workflows within Workflow Studio and should be the same account that is added to Component Services later in these steps.  

IIS Setup

  • Open IIS and create a virtual directory for the application.  Point the virtual directory to the folder specified above.  Enable script execution on the directory.
  • View the properties of the virtual directory in IIS. In the ASP.NET tab, set the ASP.NET version to 2.0.50727.

Component Services Setup

  • Launch Component Services by navigating to Start->All Programs->Administrative Tools->Component Services
  • Within Component Services, navigate to Computers->My Computer->COM+ Applications.  Right-click COM+ Applications and select New->Application
  • The wizard now starts.  Create an empty application
  • Specify a name such as "WFSCOM" and select Server Application
  • Set the application identity to a Workflow Studio admin account
  • Create a new role called "Access"
  • Add the Workflow Studio admin account to the Access role
  • Complete the wizard
  • After the COM+ application is created, add a new component to the COM+ application.  Navigate to Computers->My Computer->COM+ Applications->WFSCOM->Components.  Right-click Components and select New->Component.
  • The wixard now starts.  Choose to install a new component
  • Browse to the WFSCOM.dll file (C:\Citrix\WFSWebClient\bin\WFSCOM.dll).
  • Complete the wizard

You should now see the WFSCOM.WFSAction COM object listed within the Components section.  In the Interfaces section, there is an inteface called IWFSAction that contains the methods of our COM object.  The ASP.NET code calls the COM object to execute these methods.  Since this object resides inside Component Services, these methods run outside the context of IIS under the Workflow Studio admin account that we specified above. 


Lessons learned from developing this application
Developing an ASP.NET web application that executes workflows actually turned out to be a little more difficult than building the equivalent Windows application.  With a Windows application, the application runs under the context of the logged-on user account. If that logged on user had permissions to execute workflows inside Workflow Studio, that user would be able to use the custom Windows application without issues.  With a Web application, the application runs under the context of IIS.  You can modify the account that runs a web application in a few places.  (1) Editing the properties of the virtual directory or (2) Including a <identity impersonate="true"> tag inside the web.config file of the ASP.NET application. 

Armed with that knowledge I set out to build the ASP.NET application.  The approach I initially took was to take all of the code I had inside the Windows application and paste it into the ASPX page and code-behind page.  The only thing I changed was I replaced all of the Windows controls with Web controls and I changed how I sent messages back to the user.  When debugging this application inside Visual Studio, my application actually ran fine.  However when I deployed it to IIS and ran it, that was a different story.  I kept on getting Access Denied messages whenever I wanted to retrieve the workflow list or execute a workflow.  Something inside those functions was causing me issues...

After much debugging, I deduced that the code that was causing the Access Denied messages was when I was trying to get a reference to the deployed workflow inside my PowerShell SDK code.  For whatever reason, IIS just did not have the permissions to execute the Workflow Studio Powershell cmdlet called get-deployedworkflow.  I put this section of code below so you are aware of which section I was having issues with.

//Get reference to the deployed workflow. We are executing the Powershell command below:
//$workflow = get-deployedworkflow -workflowruntime $runtime -workflowname $strWorkflowName -includeschedule
l_objPipeLine = l_objRunspace.CreatePipeline();
l_objCommand = new Command("get-deployedworkflow");
l_objCommand.Parameters.Add("workflowruntime", l_objRuntime);
l_objCommand.Parameters.Add("workflowname", l_strWorkflowName);
l_objCommand.Parameters.Add("includeschedule");
l_objPipeLine.Commands.Add(l_objCommand);
l_objCommandResults = l_objPipeLine.Invoke();   //Get Access Denied here when running this code in IIS
PSObject l_objWorkflow = l_objCommandResults[0];
l_objPipeLine = null
 
 

After playing with the Virtual Directory account settings and web.config impersonation settings for a while, I still was not able to get past the Access Denied message.  I would have thought that setting the web.config <identity> tag to the Workflow Studio admin account would have done the trick, but I still received that error message.  So I then I went to Plan B and thought of a different approach.  What if I take that particular code outside of IIS and put it into a more controlled environment where I can run it under whatever account I want and not have to worry about IIS getting in the way? 

That solution was Component Services.  I'm not an everyday developer (probably have one development project a year), but I remembered using Component Services many years back with a MFCOM application I wrote.  (MFCOM is the XenApp API).  With that application, I wanted to be sure that my MFCOM code would run under the context of a XenApp admin account and not the logged on user account.  So creating a COM object and placing that object within Component Services allowed me to run it under whatever account I needed.  With Component Services, you also have the choice of running the COM object in-process as a library application or out-of-process as a server application.  When you run it out of process, it is executed within a different memory space than the calling application.  Creating a COM object and executing it as a server application under the context of a Workflow Studio admin account was the missing ingredient for the Web Application that I was building.  Since it runs out-of-process, IIS can't get in the way and mess with those security permissions any more!

Although most of the Workflow Studio cmdlets functioned fine when running within IIS, I decided to move the entire Powershell SDK functions themselves to the COM object that I would run within Component Services.  Although this sounds really complicated, the good news is that I've done all the work for you.  The COM object that I am providing within this article has all the functions you need for executing a workflow.  If you want to create your own ASP.NET application that executes workflows, you just need to add my COM object to Component Services on your Workflow Studio machine, and then call the methods of the COM object inside your ASPX page.  If you are reading this article, I would venture to guess that you might have quite a bit of experience in working with ASP.NET so you should have the tools you need to proceed from here. 

About the source code:
The source code above includes both the ASP.NET web application and the COM object for executing the workflows.  Your development machine will need Visual Studio 2008, Workflow Studio, Powershell 1.0, Powershell SDK, and IIS. 

If you want to step through the code within Visual Studio, you'll need to place the COM object within Component Services on your development machine.  You can follow the manual steps above for doing this or use the regsvcs utility.  To use regsvcs.exe, open the Visual Studio command prompt and type a command such as this:

regsvcs /c "C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\WFSWebClient\WFSCOM\bin\Debug\WFSCOM.dll"
 
 

I tried to code the COM object so that you wouldn't need to make any changes to it if you just wanted to execute workflows on Workflow Studio.  If you do need to make changes to the COM object for any reason, remove the COM object from Component Services.  If you placed the COM object within the global assembly cache (GAC), remove it from the GAC as well.  (The GAC resides in C:\Windows\Assembly.  Just right-click on the WFSCOM assembly to un-install it).  Then open the Visual Studio solution and make changes to the WFSCOM project as you need to.  Re-compile the project.  When you are ready to re-deploy the COM object, add WFSCOM.dll to the global assembly cache (GAC) to get a new type library (.tlb file).  To add it to the GAC, just execute a command such as below.  Then re-add WFSCOM.dll back to Component Services using the regsvcs command above.  If you open Component Services, you should now see the WFSCOM COM+ application listed.

gacutil.exe /i "C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\WFSWebClient\WFSCOM\bin\Debug\WFSCOM.dll"
 
 


I hope this blog series on automating Workflow Studio will help you out with your projects.  Happy coding!

Blogs in this series:
Using Powershell to automate workflow execution within Citrix Workflow Studio
Passing parameters into a workflow within Citrix Workflow Studio
Automating workflow execution for Citrix Workflow Studio using a .NET windows application
Automating workflow execution for Citrix Workflow Studio using an ASP.NET web application (this one)

Expand Blog Post
Permalink | Twitter Post to Twitter | Comments (0) | Views (2660) |

posted by Ed York

This is the third part of a four-part series on automating workflow execution within Citrix Workflow Studio.  In the first two parts of the series, I discussed how you can create Powershell scripts to execute workflows.  Part 1 provided a high-level overview of creating Powershell scripts for automating workflow execution and Part 2 expanded on those scripts to discuss how to pass parameters into the workflow.  In this blog, I will discuss how you can automate workflow execution with a custom Windows application.  The sample .NET application I built is shown below.  I am providing both the executable and full source code to allow you to expand upon this solution to meet the needs of your environment.



When would I need to use a custom application for executing workflows?
A lot of you might be asking the question - "If we can use the Workflow Studio Console to execute workflows, why would I need a custom application to do that for me?".  The answer really comes down to how you need to execute certain workflows in your environment.  If you need to execute workflows "on-demand" or "on a schedule", the Workflow Studio Console would meet those needs.  Just open the Workflow Studio Console and schedule a job to run immediately or on a pre-determined schedule.  However, if you need "event-driven" automation where a third-party application kicks off the execution of a workflow based on an event happening, that is where you need to be able to hook into Workflow Studio with a custom solution to perform that type of automation. 

The custom application provided in the Downloads section below provides a sample for how you can tie any .NET windows application to Workflow Studio for executing workflows.  Feel free to try out the sample application on your Workflow Studio machine.  The full source code is also provided to allow you to customize and extend the application further based on what you need to do.

Downloads:
Download the application executable here
Download the application source code here
 

Preparing your Workflow Studio environment to use the custom application:
The custom application needs to run on a machine that contains Workflow Studio since it ties into Powershell and calls the Workflow Studio cmdlets for performing various actions on Workflow Studio.  In your Workflow Studio Console, you will need to pre-deploy the workflow that you want to automate (see Part 1 for more information on pre-deploying workflows).  The workflow that you want to automate can include parameters as well.  Parameters for a workflow are defined in the Workflow Studio Designer under the Global Properties section (see Part 2 for more information on defining workflow parameters).

This custom application functions as any typical Windows application in that it runs under the context of the logged-on user account.  The logged-on account needs to have permissions in Workflow Studio to execute workflows.  These permissions are defined in the Security section of the Workflow Studio Console.  For simplicity, I typically add the user accounts as a "Workflow-Admin", but you can play with the security roles here to determine what roles are actually needed.



Using the custom application:
To use the custom application, log onto your Workflow Studio machine with an account that has permissions to execute workflows within Workflow Studio.  Place WFSWorkflowExecute.exe on your Workflow Studio machine.  When you launch the application, the initial view is shown below.



Click the Get Runtimes button to get the Workflow Studio runtimes that are installed on the local machine.  The runtimes are listed within the combo-box below and the name of the runtime specifies which account the runtime is running under.  



When a runtime is selected, all of the workflows that are deployed on that runtime are listed as well.  To execute a certain workflow, you need to know which runtime you deployed the workflow on.   This sample application also provides the version of the workflow as you may have deployed two different versions of the same workflow to the same runtime.  Using the version numbers helps you keep them straight.

When you want to execute a workflow, you need to know if that workflow requires any parameters.  The workflow parameters are defined in the Workflow Studio Designer in the Global Properties section of the workflow.  As mentioned above, Part 2 of this blog series goes into detail on how to define and use parameters inside a workflow.



When specifying workflow parameters inside the custom application, the parameter name is case sensitive.  (Notice how I kept the parameter name as "gMessage").  If you mistype the parameter name or use the wrong case, you will get an error message when executing the workflow stating that the parameter name is not recognized.  Just keep this in mind as you type the name of the parameters into the application.



Click the Execute Workflow button to execute the workflow.  If the workflow was successfully executed, you'll get a pop-up message indicating success.



To verify the workflow was executed, you can open the Workflow Studio Console and check out the Jobs section. 



Understanding the source code:
A lot of you out there will want to customize this application in your own environment.  I developed this application with C# using Visual Studio 2008 and the Powershell SDK.  Your development machine will also need Powershell 1.0 and Citrix Workflow Studio.  For advice on setting up your Visual Studio environment, check out this article.  If you follow the steps in that article, you'll just need to add the Powershell SDK and you should be all set.

The Powershell SDK is included as part of the Windows Software Development Kit.  You can get information on the Poweshell SDK here.  I downloaded the full ISO and it took me quite a while to get it.  When you are ready to install, you don't need everything in the setup wizard.  The Powershell SDK link provided above actually tells you what you specifically need to install to just get the Powershell SDK.  To use the Powershell SDK inside your Visual Studio project, the project will need to reference System.Management.Automation.dll.  

Once you get your development machine set up, you can open the solution that I provided above inside Visual Studio.  Essentially all this custom application does is use the Powershell SDK APIs to execute cmdlets on Powershell.  Since Workflow Studio provides Powershell cmdlets to automate various tasks, we can use the Powershell SDK to automate many Workflow Studio functions. 

From my personal experience, using the Powershell SDK takes a little time getting used to.  What I found to be helpful is to first write out the Powershell commands in Notepad and test them within Powershell to make sure they are functioning as expected.  If you are working with Powershell variables, use the echo statement frequently to understand the current value of the variable.  Then when you are ready to use the Powershell SDK in your Visual Studio project, you can convert each of your Powershell statements to the equivalent Powershell SDK code.  In the source code that I provided for this custom application, I put comments into the code to explain what Powershell command I was trying to execute within that code block.  Reviewing those comments should help you to get started with understanding how to use the Powershell SDK.  For example, here is the ExecuteWorkflow() function that is used by the custom application.  Stepping through this code inside Visual Studio and watching the variables is another great way to learn this code.

public string ExecuteWorkflow(Hashtable objFunctionParameters, Hashtable objWorkflowParameters)
{
   try
   {
      //Declare local variables
      string l_strReturn = "Executing workflow";
      string l_strWorkflowName = objFunctionParameters["WorkflowName"].ToString();
      string l_strRuntimeName = objFunctionParameters["RuntimeName"].ToString();
      Hashtable l_objWorkflowParameters = objWorkflowParameters;

      //Create a runspace containing the Workflow Studio snap-ins
      RunspaceConfiguration l_objRSConfiguration = RunspaceConfiguration.Create();
      PSSnapInException l_objSnapInException = null;
      l_objRSConfiguration.AddPSSnapIn("Citrix.WorkflowStudio.Azman", out l_objSnapInException);
      l_objRSConfiguration.AddPSSnapIn("Citrix.WorkflowStudio.Core", out l_objSnapInException);
      l_objRSConfiguration.AddPSSnapIn("Citrix.WorkflowStudio.DataStore", out l_objSnapInException);
      l_objRSConfiguration.AddPSSnapIn("Citrix.WorkflowStudio.Installer", out l_objSnapInException);
      Runspace l_objRunspace = RunspaceFactory.CreateRunspace(l_objRSConfiguration);
      l_objRunspace.Open();

      //Get reference to the Workflow Studio runtime that was passed in.
      //We are executing the Powershell command below:
      //$rt = Get-WorkflowRuntime -ServiceName $ServiceName
      Pipeline l_objPipeLine = l_objRunspace.CreatePipeline();
      Command l_objCommand = new Command("get-workflowruntime");
      l_objCommand.Parameters.Add("ServiceName", l_strRuntimeName);
      l_objPipeLine.Commands.Add(l_objCommand);
      Collection<PSObject> l_objCommandResults = l_objPipeLine.Invoke();
      PSObject l_objRuntime = l_objCommandResults[0];
      l_objPipeLine = null;

      //Get reference to the deployed workflow that was passed in.
      //We are executing the Powershell command below:
      //$workflow = get-deployedworkflow -workflowruntime $rt -workflowname $strWorkflowName -includeschedule
      l_objPipeLine = l_objRunspace.CreatePipeline();
      l_objCommand = new Command("get-deployedworkflow");
      l_objCommand.Parameters.Add("workflowruntime", l_objRuntime);
      l_objCommand.Parameters.Add("workflowname", l_strWorkflowName);
      l_objCommand.Parameters.Add("includeschedule");
      l_objPipeLine.Commands.Add(l_objCommand);
      l_objCommandResults = l_objPipeLine.Invoke();
      PSObject l_objWorkflow = l_objCommandResults[0];
      l_objPipeLine = null;

      //Schedule the workflow to run immediately.
      //We are executing the Powershell command below:
      //schedule-workflow -workflowruntime $rt -workflowstrongname $workflow.WorkflowStrongName -workflowparameters $wfparameters -runimmediately
      l_objPipeLine = l_objRunspace.CreatePipeline();
      l_objCommand = new Command("schedule-workflow");
      l_objCommand.Parameters.Add("workflowruntime", l_objRuntime);
      l_objCommand.Parameters.Add("workflowstrongname", l_objWorkflow.Properties["WorkflowStrongName"].Value.ToString());
      l_objCommand.Parameters.Add("workflowparameters", l_objWorkflowParameters);
      l_objCommand.Parameters.Add("runimmediately");
      l_objPipeLine.Commands.Add(l_objCommand);
      l_objCommandResults = l_objPipeLine.Invoke();
      l_objPipeLine = null;

      //Close the runspace
      l_objRunspace.Close();

      //Return success
      l_strReturn = "Job completed!";
      return l_strReturn;
   }
   catch (Exception objException)
   {
      //Initialize error message
      string l_strError = "";
      l_strError = "An error has occurred. The error is \"" + objException.Message.ToString() + "\". ";
      return l_strError;
   }
}

Blogs in this series:
Using Powershell to automate workflow execution within Citrix Workflow Studio
Passing parameters into a workflow within Citrix Workflow Studio
Automating workflow execution for Citrix Workflow Studio using a .NET windows application (this one)
Automating workflow execution for Citrix Workflow Studio using an ASP.NET web application






Expand Blog Post

1   2     3     4     5   Next >>