Lifecycle Events work in three layers: activity sets hold the stages, trigger conditions decide when each stage starts, and activities do the work. Rescind reverses finished work, and test tools preview audiences before a live case opens. Steps below cover the Brazil release.
How activity sets, activities and triggers fit together
A lifecycle event is a collection of activities that often cross departmental lines, so the builder groups them into activity sets. Each set is one stage. In a new hire onboarding event, the stages might be pre-hire, pre-boarding and day one. An activity belongs to one set, and a set belongs to one lifecycle event.
Build the lifecycle event first, then create a matching HR service so employees can request it. The builder is reached from All > Lifecycle Events > Administration > Manage Lifecycle Events, on the Activity Sets tab. For a related read on the builder and its triggers, see the lifecycle events builder and triggers for employee requests.
Lifecycle event and activity set settings
The lifecycle event form holds a Title, an Active flag, a Description and an Event type, which is Onboarding, Offboarding, Transitions or HR Services. Sort activities by sets the employee view to due date or display order. Display activity sets to subject person shows the timeline on the HR ticket page, and it also needs the Show case to subject person option on the matching HR service.
Each activity set has a Title, an optional Display title, a Description, an Active flag, a Display order, check boxes for the opened-for and subject persons, an Audience and a trigger condition. The display title is the employee-facing name, and the Title is used when it is blank. The display order controls layout only. It has no relation to when a set triggers.
Hiding a set from a person does not hide their work. To-dos assigned to the opened-for or subject person still appear on the HR ticket page, while to-dos assigned to anyone else are hidden.
Setting trigger conditions
| Trigger type | When the set starts | Inputs |
|---|---|---|
| Immediate | When the case is created | None |
| Date | Before, on or after a chosen date | Trigger table, trigger field, Ignore empty date, offset type, quantity and units |
| Other Activity Sets | After named sets complete | Activity set dependencies |
| Advanced | When a trigger script returns true | Trigger script |
| Condition | When condition builder criteria are met | Condition table and condition |
| Combination | When a date, other sets or conditions are met | Combination type, And or Or |
For date triggers, the offset type is None, Before or After, and the units are days, weeks or months. With Ignore empty date selected, a set does not trigger when its date field is empty. Changing a date applies to open cases whose sets have not yet triggered, so finished stages are not rewritten.
The Advanced trigger receives two variables. The parentCase variable references the parent case, and the hrTriggerUtil variable checks other activity sets or dates. The sample script checks for a manager on the subject person, an elapsed employment start date and two completed prerequisite sets. Replace its sys_ids with your own, copied from the Form Context Menu of each set. An And combination needs all listed triggers to be met, and an Or combination needs any one of them.
When triggers are evaluated
The HR Activity Set Launcher workflow drives the process. It checks date- and script-triggered sets every four hours by default. Frequent evaluation fires more events and could cancel activity sets before the lifecycle event completes, so caution is advised. The base system runs at most 25 activity sets at once. The limit can be raised through Max Simultaneous under the Parallel Flow Launcher activity properties of that workflow.
Building activities by type
There are eight activity types: Approval, Employee task, Fulfiller activity, Notification, Flow, Content, Activity container and Pulse survey. All share Title, Description, Activity type, Active, Owning group, Activity set and Audience. Creating, updating or deleting an activity requires membership in the owning group and the sn_hr_le.activity_writer role.
Approvals
An approval creates a to-do for approvers drawn from groups, from named users, or from the case. Wait for controls who decides: anyone, everyone, or the first person to respond. On rejection, you can allow resubmission, which sends the request back to all approvers, or close the activity as incomplete. For missing approvers, you can select replacements, skip the missing approver, or close the activity. When all approvers are missing, skipping is not offered.
Employee tasks and field mapping
An employee task is assigned to the subject person and built from an HR task template. For HR Service, Submit Catalog Item and Submit Order Guide task types, Wait for generated task to complete keeps the activity open until the generated HR case, request or IT request finishes. That setting applies to new cases. Activities already running do not wait.
Field mappings copy case values onto child activities. A mapping takes a value from a field with a matching data type, or from custom text that can include variables such as the subject person.
Fulfiller activities
A fulfiller activity hands work to a department. The types are Automated Order Guide, Catalog Item, Flow, HR Service, HR Task and Incident, and Automated Order Guide, Catalog Item and Incident require Lifecycle Events for Enterprise. A badge shows employees which department is working on the request. For the underlying catalog concept, see catalog item explained.
Avoid giving a fulfiller activity an HR service with the same lifecycle event type as the case. The two can loop and cause a memory issue.
Notifications, flows and content
A notification uses an email template, a From name and recipients who are users, groups or user fields on the case. A flow runs a subflow. The out-of-box subflow is Switch primary job, which supports employees with several jobs. Other subflows need additional configuration first. Flow inputs map from a field, custom text or a custom script, and the Input mandatory setting follows the subflow. For background on flow technology, see action flow designer explained.
A content activity uses a schedule content template and needs the sn_cd.content_manager role. Its audience is set with audience records, which can target the subject person, the opened for person or a person working on the case.
Containers and pulse surveys
Member activities inherit the audience of their container, trigger according to the order number they are given, and cannot themselves be activity containers. A container cannot sit inside another container, and existing activities cannot be moved into one. A pulse survey sends a chosen survey to users picked from a Pulse user field.
Surveys can also create later work. A Collect Employee Input task can generate a downstream activity from an answer. For example, a manager could be asked about a new hire’s workspace, and the answer could lead to a follow-up survey that anyone with access to the original case can complete. The sn_hr_core.create_new_survey_instances property sets whether a new survey instance is created for each task.
Audiences, ordering and rescind
An activity with no audience record triggers for all employees. The set-level audience is checked first, and the activity-level audience second. When a subject person does not meet the audience during evaluation, the State field on that activity set’s context record is set to Skipped. Audiences cannot be set on Rescind-trigger sets.
To reorder, drag an activity within or between sets, use the reorder pop-up, or edit the Activity set and Display order fields. Request activities cannot be reordered, and nothing can move above a request. Reordering requires the admin role.
Rescind handles cases where a new hire decides not to join or an offer is revoked. Click Enable Rescind on the Activity Sets tab, then add rescind activities to the set that appears on the right of the builder. Each names the activity it reverses. Any activity of the same lifecycle event type qualifies, except containers and other rescind activities. A rescind activity inherits the audience of the activity it reverses, so changing that activity changes the rescind audience too. The role is sn_hr_le.admin or sn_hr_le.activity_set_manager.
Testing before launch
The lifecycle event test tool lets you select a subject person to check. Show inapplicable activities and sets reveals items the person does not qualify for. Show indeterminate reveals items where the audience cannot be decided. Preview shows what would trigger, while Test creates a test lifecycle event case for the chosen person. When a user matches an activity but not its set, both still appear. Testing requires sn_hr_le.admin. For a wider checklist to work through before go-live, see the employee onboarding and lifecycle events testing checklist.
Logging and setup
Set the sn_hr_le.log_level system property to choose which log entries are written. Entries go to the HR Lifecycle Events Case Logs table, sn_hr_le_case_log, written by the LifecycleEventLogger and LifecycleEventLoggerSNC script includes and sn_hr_LE_Error.
Each lifecycle event also needs an HR service. In HR Services, open HR Service Configuration, set the fulfillment type to Lifecycle Event, pick the lifecycle event type and a COE. Creating it requires sn_hr_core.admin. For the general setup of HR services that employees request, see HR services catalog configuration.
Upgrades from Washington DC or Xanadu to Yokohama can use sn_hr_le.use_flow to move base workflows to flow technology. New customers get True by default and upgrading customers get False. Test in a non-production instance first, then recreate approval activities so they use the flow-based approval configuration.
Frequently asked questions
Why did a date-triggered set not start on the expected day?
Date and script triggers are checked by the HR Activity Set Launcher workflow, which runs every four hours by default. The Ignore empty date option is the setting that stops it when the date field is blank.
How do I check who receives an activity before a live case opens?
Use the lifecycle event test tool to show inapplicable and indeterminate activities and sets, then preview. Test creates a test lifecycle event case, so use it deliberately.
Does a rescind activity need its own audience?
No. It inherits the audience of the activity it reverses, so changing that activity changes the rescind audience too.
Where should I start?
Begin with the lifecycle event overview for the basics, then return here for configuration. The employee onboarding and lifecycle events hub lists the related guides.