
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2025 11:35 AM
Hello. Within an HR Service, if my Fulfillment Type is set to "Service Activity", is there any way to have Approval or Task records triggered conditionally? Or do I have to switch to "Flow"?
Many of our HR Services have Category and Subcategory variables, and we only want the Service Activities kicking in when certain Category or Subcategory values are specified by the end user. Thanks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2025 08:21 AM - edited 02-26-2025 08:24 AM
I discovered that for HR Services you CAN use the very convenient (and simple) Fulfillment type of "Service Activity" and you can still have the HR Tasks generated CONDITIONALLY, as follows:
Setup a "Before Insert" type business rule on table "sn_hr_core_task". Check the advanced checkbox and write a script which checks for whatever conditions you want, such as:
Short Description (of the task) = X
HR Task Type = Y
Parent Case . Field Whatever = Z
Then, if the conditions are NOT MET, use the current.setAbortAction(true) command to abort the entire Insert operation. This will cause the task to NOT be inserted, and ServiceNow will simply move on to the Next task in the ordered list.
Here is example:
Please mark as helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 05:52 AM
@G24 Since there is no way conditions can be specified with Service Activities, your best bet would be to chose the fulfilment type as flow/workflow.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2025 08:21 AM - edited 02-26-2025 08:24 AM
I discovered that for HR Services you CAN use the very convenient (and simple) Fulfillment type of "Service Activity" and you can still have the HR Tasks generated CONDITIONALLY, as follows:
Setup a "Before Insert" type business rule on table "sn_hr_core_task". Check the advanced checkbox and write a script which checks for whatever conditions you want, such as:
Short Description (of the task) = X
HR Task Type = Y
Parent Case . Field Whatever = Z
Then, if the conditions are NOT MET, use the current.setAbortAction(true) command to abort the entire Insert operation. This will cause the task to NOT be inserted, and ServiceNow will simply move on to the Next task in the ordered list.
Here is example:
Please mark as helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2025 08:34 AM
@G24 This solution is not scalable as there could be many such conditions associated with different HR Services and if you try to cover them via different business rule then the performance of your instance will take a hit.
Also, current.setAbortAction(true) results in an error message "Invalid update" on screen which may confuse your users.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2025 11:30 AM - edited 02-26-2025 11:30 AM
I think it will be fairly easy to maintain, and can all be done in a single business rule. I think that's a small price to pay since we do not want to be forced into much more complicated Flow technology. Performance impact will be negligible.
I did not see any "Invalid Update" message during my testing.