Network error appears when opening a SmartForm approval task

  • 16 February 2021
  • 0 replies
  • 192 views

Userlevel 5
Badge +20
 

Network error appears when opening a SmartForm approval task

kbt134345

PRODUCT
K2 blackpearl
K2 smartforms
BASED ON
K2 blackpearl (all)
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. 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.

Issue

When attempting to open a SmartForm approval task, the user is presented with the following error:

 

 
"A network error has occurred. Unable to execute a server-side operation."

 

 

Form data and the task action drop-down is not populated.

Image

Symptoms

When the 'open a worklist item' action is called on the task form load via an AjaxCall.ashx, it will try to retrieve the task actions and data/XML fields and return them in an XML format.

 

In the workflow design, there is a data field that would be populated with an error stack trace when a PowerShell script fails to execute; possibly from custom code or a custom broker.

 

This injected the '�' (null character) into the data field, which is an invalid character when it is returned in the response body XML for the AjaxCall and thus results in the error.

 

Resolution

Possible methods to prevent this error:

1. Set this data field to an empty string prior to the client event/user task action (if this data is no longer needed)

Image

2. Based on how this data field is populated, address and remove these null characters in the custom code/custom broker before it is passed into the data field (if this data field is still needed)

Image

3. Use inline expressions to remove this character afterwards (if this data field is still needed):

Image

a. URL Encode the data field
b. This will surface the null character as %00
c. Use a Replace function to replace %00 with empty string
d. URL Decode the data field.


0 replies

Be the first to reply!

Reply