Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Update data from external system in SD 5.1

Highlighted
VictorD
Occasional Advisor

Update data from external system in SD 5.1

Hi,

When I try to use "Update data from external system" action in UI rule, I get an error:
"The results array of the External Data Provider has the wrong size."

I've used the same script and the same rule in SD 4.5 -> it worked perfect.

The UI rule gets only one parameter from External system. The .jsp script is:

<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page import="java.sql.*,java.text.NumberFormat, java.net.URLEncoder"%>
<%String Lchild = null;
Lchild = request.getParameter("output_field_value_0");
out.println("n_fields=1&field_0=value");
%>

It's just a test script but I cant make it work correctly.

Can anyone help?

Best regards,
Victor
4 REPLIES
CADBIOSS
Esteemed Contributor

Re: Update data from external system in SD 5.1

Victor,

The DB of 5.1 is different than that of 4.5. This is probably why you're getting the array size error.

In order to properly diagnose your problem, we need to understand what table you're trying to retrieve your data from and a bit more detail on the connection setup.

Cheers...

Jim
HWANY
Collector

Re: Update data from external system in SD 5.1

i have same problem (service desk 5.1)

error popup is "The results array of the External Data Provider has a wrong size."

follow logfile

1ì 25, 2007 4:28:15 ì ¤í ; FINER; : Rule: tests, action description: Action: test (Data Exchange with External System)1ì 25, 2007 4:28:15 ì ¤í ; FINER; : URL: http://10.x.x.x:7001/jsp/param_test.jsp
1ì 25, 2007 4:28:15 ì ¤í ; FINER; : Session ID: 149448210
1ì 25, 2007 4:28:15 ì ¤í ; FINER; : Rule name: tests
1ì 25, 2007 4:28:15 ì ¤í ; FINER; : Action name: test
1ì 25, 2007 4:28:15 ì ¤í ; FINER; : Entity ID: 00000000-0000-0000-0000-00002c4e0008
1ì 25, 2007 4:28:15 ì ¤í ; FINER; : Entity name: Incident
1ì 25, 2007 4:28:15 ì ¤í ; FINER; : Primary key: 00000000-0000-0000-0289-b33b75f9731a
1ì 25, 2007 4:28:15 ì ¤í ; FINER; : Time out: 10000 ms
1ì 25, 2007 4:28:15 ì ¤í ; FINER; : Parameters: bc751082-52b0-7520-c305-00dbf95be694 some text test 61
1ì 25, 2007 4:28:15 ì ¤í ; FINER; : Output fields: {[{[00000000-0000-0000-0000-000021290003]}]}
1ì 25, 2007 4:28:15 ì ¤í ; FINER; : Output fields names: {[Description]}
1ì 25, 2007 4:28:15 ì ¤í ; FINER; : Output values: {[ESM9.]}
1ì 25, 2007 4:28:15 ì ¤í ; FINER; : Input fields: {[{[00000000-0000-0000-0000-00002c0c003d]}],[{[00000000-0000-0000-0000-00003f9f0015]}]}
1ì 25, 2007 4:28:15 ì ¤í ; FINER; : Input field names: {[Information],[IncidentText1]}
1ì 25, 2007 4:28:15 ì ¤í ; FINER; : Results: {}


plz help me.



Tom Hag
Super Collector

Re: Update data from external system in SD 5.1

I have the same problem.

The script is executing, but no return value is sent to service desk.

Extract from script:
out.println("n_fields=1&field_0=feedback");
Gerry Allardice
Honored Contributor

Re: Update data from external system in SD 5.1

I too have experienced this problem. I have narrowed it down to the two CR+LF that the apache web server seems to put at the start of the response when processing the jsp file. I can sucessfully call a straight html file, a response generated by php, and even the response generated by a jsp if a pass it through a filter to strip out the extra CR+LF at the start of the response.

If you just call the data provider with a browser and look at the source you can see the extra characters. It seems 4.5 can handle these OK but ovsd5.1 can handle this white space.
//Add this to "OnDomLoad" event