---
sourceDocument: Australia Employee Service Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/pt-BR/employee-service-management

 Release :

    - australia

ft:locale :

    - pt-BR

ft:publication_title :

    - Australia Employee Service Management

ft:clusterId :

    - emplsm

bundleId :

    - emplsm

workflow :

    - Employee


---

# Lifecycle event script includes and APIs

# Lifecycle
event script includes and APIs {#ariaid-title1}

* Versão de lançamento: Australia
* 
* Atualizado 12 de mar. de 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 min. de leitura

Script includes call workflows within Lifecycle Events.  
The following script includes are provided with Lifecycle Events:{#LEScriptIncludes__table_dcg_r4h_h1b__entry__2}

| Name | Description |
|-|-|
| hr_ActivitySet | Main script include for Lifecycle Events workflows and activity management. |
| LaunchActivities | API to launch an instance of all activities under an activity set. Called when a Lifecycle Event case is created. |
| getAvailableDependentActivitySets(activitySet) | Retrieves a collection of dependent activity sets for an activity set. |
| isActivitySetCompleted | Checks when all activities in a set are complete. |
| IsActivitySetActive | Checks when an activity set is active. |
[Tabela 1. Script includes installed with Lifecycle Events]

{#LEScriptIncludes__table_dcg_r4h_h1b}The following APIs are provided with Lifecycle Events: hr_LEType - Contains methods related to Lifecycle Event types, activity sets, and activity set activities.Methods related to Lifecycle Event Types:

* createLEType(@param - REQUIRES: Array of js objects having field name value pairs) - Returns js object with status - 'success'.
* updateLEType(@param - REQUIRES: Array of js objects having field's name value pairs and Lifecycle Event Type Id) - Returns js object with status - 'success'.
* removeLEType(@param - REQUIRES: Lifecycle Event Type Id) - Returns js object with status - 'success'.
{#LEScriptIncludes__ul_t2c_jqh_h1b}  
Methods related to Activity Sets:

* createActivitySet(@param - REQUIRES: Array of js objects having field's name value pairs) - Returns js object with status - 'success'.
* updateActivitySet(@param - REQUIRES: Array of js objects having field's name value pairs and ActivitySetId) - Returns js object with status - 'success'.
* removeActivitySet(@param - REQUIRES: activitySetId) - Returns js object with status - 'success'.
{#LEScriptIncludes__ul_e4v_krh_h1b}  
Advanced:

* Hr_triggerUtil -- Convenience methods for advanced scripting on running activity sets.
* checkActivitySetsCompleted(activitySetList) -- Verify when activity sets in the list are complete.
* checkForElapsedDate(date) -- Verify when the date passed in has elapsed.
* checkForElapsedDateWithOffset(date, offset, offsetUnits, offsetType)
{#LEScriptIncludes__ul_a4b_fth_h1b}

