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.
|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:
- Create 'Simple InfoPath form' with two textbox controls - one of data type(text) the other of data type(hyperlink).
- Create a process, and integrate with the InfoPath form created in Step 1 - publish to MOSS Form library.
- Create a Mail event, and add the two XML process fields to the 'Message Body'.
- Deploy the process, and test from the form library.
- 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:
- Run through the mail event, and remove the XML process field of hyperlink type, finish the wizard
- Redeploy the process and test again
- Email will send correctly
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