{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":12666,"path":"employee-service-management/lifecycle-events/LEScriptIncludes.md","title":"Lifecycle event script includes and APIs","bundle":null,"doc_type":null,"release":"australia","body":"\n# Lifecycle event script includes and APIs\n\nScript includes call workflows within Lifecycle Events.\n\nThe following script includes are provided with Lifecycle Events:\n\n|Name|Description|\n|----|-----------|\n|hr\\_ActivitySet|Main script include for Lifecycle Events workflows and activity management.|\n|LaunchActivities|API to launch an instance of all activities under an activity set. Called when a Lifecycle Event case is created.|\n|getAvailableDependentActivitySets\\(activitySet\\)|Retrieves a collection of dependent activity sets for an activity set.|\n|isActivitySetCompleted|Checks when all activities in a set are complete.|\n|IsActivitySetActive|Checks when an activity set is active.|\n\nThe 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:\n\n-   createLEType\\(@param - REQUIRES: Array of js objects having field name value pairs\\) - Returns js object with status - 'success'.\n-   updateLEType\\(@param - REQUIRES: Array of js objects having field's name value pairs and Lifecycle Event Type Id\\) - Returns js object with status - 'success'.\n-   removeLEType\\(@param - REQUIRES: Lifecycle Event Type Id\\) - Returns js object with status - 'success'.\n\nMethods related to Activity Sets:\n\n-   createActivitySet\\(@param - REQUIRES: Array of js objects having field's name value pairs\\) - Returns js object with status - 'success'.\n-   updateActivitySet\\(@param - REQUIRES: Array of js objects having field's name value pairs and ActivitySetId\\) - Returns js object with status - 'success'.\n-   removeActivitySet\\(@param - REQUIRES: activitySetId\\) - Returns js object with status - 'success'.\n\nAdvanced:\n\n-   Hr\\_triggerUtil – Convenience methods for advanced scripting on running activity sets.\n-   checkActivitySetsCompleted\\(activitySetList\\) – Verify when activity sets in the list are complete.\n-   checkForElapsedDate\\(date\\) – Verify when the date passed in has elapsed.\n-   checkForElapsedDateWithOffset\\(date, offset, offsetUnits, offsetType\\)\n\n**Parent Topic:**[Activate Lifecycle Events](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/employee-service-management/lifecycle-events/activate-enterprise-onboarding-and-transitions-scoped.md)\n\n"}}