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

Yes! That makes perfect sense!

Thank you!