
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2019 05:20 AM
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:
Scheduled Job Bulk Case Creation:
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();
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2019 06:45 AM
Does the "Run as" on the scheduled job have the correct access (roles for HR cases)?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2019 07:53 AM
okay - I guess it did... Once I added myself as the "Run As", I created a new bulk request, executed the job, and it zoomed right through and created the cases...
Interesting!
Thank you!
-Rob

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2019 07:58 AM
We ran into a similar issue because our "Run As" was "Admin" but the admin account did not have access to HR cases. Once we added the admin account to the proper groups, the scheduled job worked properly.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2019 07:59 AM
This is interesting and good to know!
Thanks again, Kirstin!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2019 08:02 AM
Great sleuthing, Kirstin!
Lena

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2019 09:29 AM
I thought I would also share. The reason we use an admin account as the "Run As" is because if "Run As" reflects an actual associate and that associate would leaves, that scheduled job would no longer work.