This article refers to legacy products, components or features. Therefore, the content in this article is offered "as is" and will no longer be updated. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.


The error Unable to cast result is received at run time when an XML process field of type 'Hyperlink' is used in an email event.

Error Scenario

Note: The circumstances described in this article are one scenario under which this issue may, or is known to occur. The description is intended to be specific to the scenario described and does not take into account all possible scenarios or circumstances.

An InfoPath form is designed which includes a URI or Datafield of type Hyperlink. This InfoPath form is then integrated with a K2 blackpearl process using the K2 Designer for Studio InfoPath process template. When the URI or Datafield of type Hyperlinnk is consumed in the process by an activity as part of either a mail event, or a rule the error Unable to cast result occurs.

Reproduce Error Scenario

The following steps combine design time and runtime tasks that can be applied to reproduce the error described above.

The steps below will assist in reproducing the error:

  1. Create 'Simple InfoPath form' with two textbox controls - one of data type(text) the other of data type(hyperlink).
  2. Create a process, and integrate with the InfoPath form created in Step 1 - publish to MOSS Form library.
  3. Create a Mail event, and add the two XML process fields to the 'Message Body'.
  4. Deploy the process, and test from the form library.
  5. During runtime no email gets sent, instead the process fails with 'Unable to cast result'.
These steps will assist in identifying the cause of the error:
  1. Run through the mail event, and remove the XML process field of hyperlink type, finish the wizard
  2. Redeploy the process and test again
  3. Email will send correctly

Error Resolution

This Hotfix is contained within the latest K2 blackpearl 0807 Update. Install the update package to resolve the error.

The latest K2 blackpearl 0807 Update is available as an independent installation package which can be found here: https://portal.k2.com/downloads/bp/default.aspx