Bulk Case Creation - Scheduled job issue

Rob Sestito
Mega Sage

Hey SN Comm!

Around 3pm yesterday, Nov 12th, I went to 'Create Bulk Cases' --> downloaded the email template --> added two users emails as a test (myself included) --> uploaded that file with the two emails --> the system file load was successful and it showed as finding myself and the second person --> I checked the box to have all cases have same Opened for and selected a person from my team that handles cases --> I used the HR Service 'Employee Profile Update' which automatically filled in the Short Description Field from the bulk case creation form --> I then went to the Bulk Case Creation scheduled job and clicked execute...

When I go to the Bulk Case Requests which shows my one request, I click into it, and it shows as running... this morning, several hours later, it still shows as running (In Progress).

Has anyone ever had this issue before? Does the Bulk Case Creation scheduled job only work with certain hr services?

Looking for any ideas as to why it would take this long.

Cheers!

-Rob

Bulk Request:

find_real_file.png

 

Scheduled Job Bulk Case Creation:

find_real_file.png

 

Condition Script:

var result = true;
var grCase = new GlideRecord('sn_hr_core_bulk_case_request');
grCase.addQuery('status','in_progress');
grCase.query();
if(grCase.next()){	
	result=false;
    gs.info(grCase.number+" is currently running");
}
result;

Run this Script:

var grCase = new GlideRecord('sn_hr_core_bulk_case_request');
grCase.orderBy('requested_time');
grCase.addQuery('status','ready');
grCase.query();
while(grCase.next()){
	var createCases = new sn_hr_core.hr_BulkCaseCreation().createCasesFromQuery(grCase.sys_id,grCase.user_selection_query,grCase.default_values,grCase.has_parent,grCase.selected_user_count,grCase.user_selection_type);
	grCase.url = createCases.url;
	grCase.update();
}
1 ACCEPTED SOLUTION

KirstinR
Mega Expert

Does the "Run as" on the scheduled job have the correct access (roles for HR cases)?

View solution in original post

15 REPLIES 15

Lena_Latham
ServiceNow Employee
ServiceNow Employee

Hi Rob. I just tested this in a New York instance and it worked fine.

When you were creating the Bulk Case, did the system return users after you clicked the Upload button (1 & 2)? Also, did it match any users when you selected the HR Service (3)?

find_real_file.png

 

Best,

Lena

Hey Lena,

Yes, it did - here are my results:

find_real_file.png

find_real_file.png

find_real_file.png

These are the results I revived when attempting this yesterday. Once I did this and clicked Create Cases - I received the BCR number, ran the scheduled job manually, saw from the BCR form that it noticed the job kick-off, and has been "running" ever since.

Thank you!

-Rob

The next thing I'd check would be the Application Restricted Caller Access list. In the Status field, filter out Allowed and see if there are any in Requested Status.

Here's a link to a free on demand course for Restricted Caller Access for HR: https://nowlearning.service-now.com/lxp?id=overview&sys_id=dab1dd7cdb52b300760a7104399619c9&type=cou...

NOTE: You will need to log into Now Learning to see the course.

 

Lena

Here are the results I have from the list: