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.
When attempting to open a SmartForm approval task, the user is presented with the following error:
"A network error has occured. Unable to execute a server-side operation."
Form data and task action drop-down is not populated.
When the 'open a worklist item' action is called on 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 result in the error.
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)
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)
3. Use inline expressions to remove this character afterwards (if this data field is still needed):
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.