Flow Designer Internal Server Error

John Prouty
Kilo Guru

I have a Flow in Flow Design and when I test it, I get:

There was an error executing the flow: Internal Server Error

How do I debug this?

I have torn the actions apart several times and cannot isolate the error.  This action is critical to my application.  It is also complex, so showing and explaining the code is difficult.

1 ACCEPTED SOLUTION

It turns out that the problem is the SLADue script has two var statements for the days variable.  When I fixed the javascript, the internal error went away.  My trigger now works.

View solution in original post

5 REPLIES 5

DirkRedeker
Mega Sage

Hi

Can you submit some more details, screenshots etc.?

BR

Dirk

Here is the overview:

find_real_file.png

Here are the details:

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

There are three scripts in the above:

SLA Due:

var gdt = new GlideDateTime();
var today = new GlideDateTime(gdt.getDisplayValue());
if (fd_data._1__look_up_record.record.sla_type == 'DAYS') {
var days = fd_data._1__look_up_record.record.sla_amount;
today.addDaysLocalTime(days);
}
if (fd_data._1__look_up_record.record.sla_type == 'DUR') {
var days = 10;
today.addDaysLocalTime(days);

}

return today;

Revision #:

// Increment Revision #
var pcs_revision = fd_data.trigger.current.pcs_revision + 1;
return pcs_revision;

Status:

// Set Status based on next Step's type
var nextsteptype = fd_data._1__look_up_record.record.route_next_step.process_step_type;
var status = '';
if (nextsteptype == 'END') {
status='CMPL';
}
if (nextsteptype == 'MID') {
status='CUR';
}
return status;

It turns out that the problem is the SLADue script has two var statements for the days variable.  When I fixed the javascript, the internal error went away.  My trigger now works.

Hi John

Great! Nice to see, that you were able to sort out.

Thanks a lot for sharing the root cause here.

Have fun & Enjoy ServiceNow

BR

Dirk