How we can create activity set, activity to implement lifecycle event.

niveditakumari
Mega Sage

Hi, 

 

How we can create activity set, activity to implement lifecycle event. 

What steps needs to be followed to achieve it.

Can anyone please tell me one example with step by step to achieve it. 

 

Regards, 

Nivedita

 

 

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi @niveditakumari ,

Create or modify a lifecycle event activity set to define a container for a group of activities.

Role required: sn_hr_le.admin or sn_hr_le.activity_set_manager

  1. Navigate to All > Lifecycle Events > Administration > Manage Lifecycle Events, and open a record.
  2. Click the Activity Sets tab to access the lifecycle event builder.
  3. Create a new or modify an existing activity set.
    • To create a new activity set, click New Activity Set.
    • To modify an existing activity set, hover over the activity set and click Edit Activity Set.
    Use the lifecycle event builder to create new or modify existing activity sets.
  4. Fill in the fields on the form.
    Activity Set form
    Field Description
    Title Name of the lifecycle event activity set.
    Display title Display title of the activity set. The display title is employee-facing only, and appears on the activity sets timeline on the HR ticket page in both portal and mobile. For example, an employee-facing title for the preboarding activity set could be "Get ready for day one." If no display title is provided, the default activity set name will be used instead.
    Description Description of the lifecycle event activity set.
    Active Option to activate the lifecycle event activity set for use.
    Display order Order number for when the activity set appears in the lifecycle event builder and in the activity sets timeline on the HR ticket page.
    Note:
    • The order number has no relation to when the activity set is triggered.
    • If no order number is provided, then the activity set will appear after all of the numbered activity sets.
    • The HR ticket page is where users can view the details of an HR case in the Employee Service Center. See HR ticket page for more information.
    Display to opened for Option to show or hide the activity set to the opened for person of the lifecycle event case. If selected, the activity set will appear in the activity sets timeline on the HR ticket page in both portal and mobile.
    Note: If not selected, the activity set will not appear in the activity sets timeline. Any associated to-dos assigned to the opened for and subject person will still appear on the HR ticket page. However, to-dos that are assigned to anyone else will be hidden.
    Display to subject person Option to show or hide the activity set to the subject person of the lifecycle event case. If selected, the activity set will appear in the activity sets timeline on the HR ticket page in both portal and mobile. This is a three-part process. In addition to selecting the check box here, you must also:
    • Select Display activity sets to the subject person for the lifecycle event type. See Configure a lifecycle event for more information.
    • Select Show case to subject person for the HR service that the lifecycle event is associated with. See Configure an HR service for more information.
    Note: If not selected, the activity set will not appear in the activity sets timeline. Any associated to-dos assigned to the subject person will still appear on the HR ticket page. However, to-dos that are not assigned to the subject person will be hidden.
    Audience The specific audience the activity set targets. Setting an audience for an activity set allows you to create activities within an activity set for a specific group of people. If the audience field is empty, the activity set applies to all employees.

    You can also use audience as a filter when using the Test Activity Sets tool. For more information, see Using the Test Activity Sets tool for a lifecycle event activity set.

    Note: You can also define an audience at the activity level. The audience criteria for an activity set overrides the audience criteria for an activity.
  5. In the Activity Set Trigger Condition section, set the trigger condition for the activity set.
     
    Trigger condition Description
    Immediate Activity set triggers upon creation of the lifecycle event case.
    Date Activity set triggers before, on, or after the specified date.
    Note: If the date for the activity set is updated, then the change will apply only to open HR cases with active activity sets that have not yet triggered.
    Trigger table Select an HR case or profile table.
    Trigger field Select a date field.
    Ignore empty date Option to not trigger the activity set when the date field is empty. If selected, the activity set will not trigger when the date field does not have a value.
    Date offset type Select the date offset type:
    • None
    • Before
    • After
    Date offset quantity Provide an offset quantity. This field is available when Before or After is selected from Date offset type.
    Date offset units Provide a unit of measure of days, weeks, or months. This field is available when Before or After is selected from Date offset type.
    Other Activity Sets Activity set triggers after the completion of one or more activity sets.
    Activity set dependencies Select one or more activity sets that must complete before the activity set triggers.
    Advanced Activity set triggers per the provided script.
    Trigger script Provide a custom script to determine when the activity set triggers.

    There are two variables in the scripts:

    • parentCase: Reference to parent lifecycle event case.
    • hrTriggerUtil: Allows checking of other activity sets or dates from other types of triggers.

    The Activity Set Launcher workflow runs every four hours to verify these conditions. See Lifecycle event workflows.

    Condition Activity set triggers per the specified conditions.
    Note: When defining conditions like case sensitivity or null values, see APIGlideFilter - Scoped, Global.
    Condition table Select an HR case or HR profile table.
    Condition Use the condition builder to define the conditions that must be met for the activity set to trigger.
    Combination Activity set triggers based on a combination of a specified date, other activity sets, and/or conditions.
    Combination type Select when the activity set triggers:
    • And: Activity set triggers only when all of the specified triggers are met.
    • Or: Activity set triggers when any of the specified triggers are met.
    Date You can specify a date as part of the combination trigger type.
    Other Activity Sets You can select one or more activity sets that must complete as part of the combination trigger type.
    Condition You can use the condition builder to define the conditions that must be met as part of the combination trigger type.
    Note: Use caution when changing the following activity set configurations:
    • Audience
    • Trigger type
    • Adding new activities to an activity set
    The changed configurations are not picked by:
    • Activity sets which are already triggered.
    • Activities which are already generated.

    Only activity sets, activities, or LE cases that have not yet triggered use the new configurations.

    Thorough testing is strongly recommended in a sub-production instance if you decide to modify any of the above configurations while having existing LE cases.

  6. Click Submit or Update.

Example: Advanced trigger script

  • Trigger type = advanced.
  • The new hire (Subject Person) has an assigned manager.
  • The start date for the new hire has been reached (cannot be empty).
  • Two specific activity sets have completed.
Lifecycle Event advanced trigger script.

Replace the sys_ids in the example with your activity set sys_ids. From your activity set, click the Form Context Menu icon and select Copy sys_id.

 Follow this Link to Configure an activity :

https://docs.servicenow.com/bundle/sandiego-employee-service-management/page/product/human-resources...

Create or modify a lifecycle event activity. Lifecycle event activities can be approvals, employee tasks, fulfiller activities, notifications, flows, content, or activity containers.

Role required: sn_hr_le.activity_writer and membership in the owning group that owns the activity.

 

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

View solution in original post

10 REPLIES 10

Community Alums
Not applicable

Hi @niveditakumari ,

Create or modify a lifecycle event activity set to define a container for a group of activities.

Role required: sn_hr_le.admin or sn_hr_le.activity_set_manager

  1. Navigate to All > Lifecycle Events > Administration > Manage Lifecycle Events, and open a record.
  2. Click the Activity Sets tab to access the lifecycle event builder.
  3. Create a new or modify an existing activity set.
    • To create a new activity set, click New Activity Set.
    • To modify an existing activity set, hover over the activity set and click Edit Activity Set.
    Use the lifecycle event builder to create new or modify existing activity sets.
  4. Fill in the fields on the form.
    Activity Set form
    Field Description
    Title Name of the lifecycle event activity set.
    Display title Display title of the activity set. The display title is employee-facing only, and appears on the activity sets timeline on the HR ticket page in both portal and mobile. For example, an employee-facing title for the preboarding activity set could be "Get ready for day one." If no display title is provided, the default activity set name will be used instead.
    Description Description of the lifecycle event activity set.
    Active Option to activate the lifecycle event activity set for use.
    Display order Order number for when the activity set appears in the lifecycle event builder and in the activity sets timeline on the HR ticket page.
    Note:
    • The order number has no relation to when the activity set is triggered.
    • If no order number is provided, then the activity set will appear after all of the numbered activity sets.
    • The HR ticket page is where users can view the details of an HR case in the Employee Service Center. See HR ticket page for more information.
    Display to opened for Option to show or hide the activity set to the opened for person of the lifecycle event case. If selected, the activity set will appear in the activity sets timeline on the HR ticket page in both portal and mobile.
    Note: If not selected, the activity set will not appear in the activity sets timeline. Any associated to-dos assigned to the opened for and subject person will still appear on the HR ticket page. However, to-dos that are assigned to anyone else will be hidden.
    Display to subject person Option to show or hide the activity set to the subject person of the lifecycle event case. If selected, the activity set will appear in the activity sets timeline on the HR ticket page in both portal and mobile. This is a three-part process. In addition to selecting the check box here, you must also:
    • Select Display activity sets to the subject person for the lifecycle event type. See Configure a lifecycle event for more information.
    • Select Show case to subject person for the HR service that the lifecycle event is associated with. See Configure an HR service for more information.
    Note: If not selected, the activity set will not appear in the activity sets timeline. Any associated to-dos assigned to the subject person will still appear on the HR ticket page. However, to-dos that are not assigned to the subject person will be hidden.
    Audience The specific audience the activity set targets. Setting an audience for an activity set allows you to create activities within an activity set for a specific group of people. If the audience field is empty, the activity set applies to all employees.

    You can also use audience as a filter when using the Test Activity Sets tool. For more information, see Using the Test Activity Sets tool for a lifecycle event activity set.

    Note: You can also define an audience at the activity level. The audience criteria for an activity set overrides the audience criteria for an activity.
  5. In the Activity Set Trigger Condition section, set the trigger condition for the activity set.
     
    Trigger condition Description
    Immediate Activity set triggers upon creation of the lifecycle event case.
    Date Activity set triggers before, on, or after the specified date.
    Note: If the date for the activity set is updated, then the change will apply only to open HR cases with active activity sets that have not yet triggered.
    Trigger table Select an HR case or profile table.
    Trigger field Select a date field.
    Ignore empty date Option to not trigger the activity set when the date field is empty. If selected, the activity set will not trigger when the date field does not have a value.
    Date offset type Select the date offset type:
    • None
    • Before
    • After
    Date offset quantity Provide an offset quantity. This field is available when Before or After is selected from Date offset type.
    Date offset units Provide a unit of measure of days, weeks, or months. This field is available when Before or After is selected from Date offset type.
    Other Activity Sets Activity set triggers after the completion of one or more activity sets.
    Activity set dependencies Select one or more activity sets that must complete before the activity set triggers.
    Advanced Activity set triggers per the provided script.
    Trigger script Provide a custom script to determine when the activity set triggers.

    There are two variables in the scripts:

    • parentCase: Reference to parent lifecycle event case.
    • hrTriggerUtil: Allows checking of other activity sets or dates from other types of triggers.

    The Activity Set Launcher workflow runs every four hours to verify these conditions. See Lifecycle event workflows.

    Condition Activity set triggers per the specified conditions.
    Note: When defining conditions like case sensitivity or null values, see APIGlideFilter - Scoped, Global.
    Condition table Select an HR case or HR profile table.
    Condition Use the condition builder to define the conditions that must be met for the activity set to trigger.
    Combination Activity set triggers based on a combination of a specified date, other activity sets, and/or conditions.
    Combination type Select when the activity set triggers:
    • And: Activity set triggers only when all of the specified triggers are met.
    • Or: Activity set triggers when any of the specified triggers are met.
    Date You can specify a date as part of the combination trigger type.
    Other Activity Sets You can select one or more activity sets that must complete as part of the combination trigger type.
    Condition You can use the condition builder to define the conditions that must be met as part of the combination trigger type.
    Note: Use caution when changing the following activity set configurations:
    • Audience
    • Trigger type
    • Adding new activities to an activity set
    The changed configurations are not picked by:
    • Activity sets which are already triggered.
    • Activities which are already generated.

    Only activity sets, activities, or LE cases that have not yet triggered use the new configurations.

    Thorough testing is strongly recommended in a sub-production instance if you decide to modify any of the above configurations while having existing LE cases.

  6. Click Submit or Update.

Example: Advanced trigger script

  • Trigger type = advanced.
  • The new hire (Subject Person) has an assigned manager.
  • The start date for the new hire has been reached (cannot be empty).
  • Two specific activity sets have completed.
Lifecycle Event advanced trigger script.

Replace the sys_ids in the example with your activity set sys_ids. From your activity set, click the Form Context Menu icon and select Copy sys_id.

 Follow this Link to Configure an activity :

https://docs.servicenow.com/bundle/sandiego-employee-service-management/page/product/human-resources...

Create or modify a lifecycle event activity. Lifecycle event activities can be approvals, employee tasks, fulfiller activities, notifications, flows, content, or activity containers.

Role required: sn_hr_le.activity_writer and membership in the owning group that owns the activity.

 

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

Community Alums
Not applicable

Hi @niveditakumari ,

Any update to this ?Any follow-up required? if not

Kindly mark the answer as Correct & Helpful both such that others can get help.

Thanks,
Sandeep

Hi @Sandeep Dutta

 

I'm not able to add roles sn_hr_le.dmin or sn_hr_le.activity_set_manager role to admin profile to start. 

Can you please suggest here. 

 

Regards, 

Nivedita

 

 

Hi Sandeep

 

What would the script look like for the following condition. 

 

15 days before employee start date, Activity set A script should check if Activity set B has all tasks completed. If Activity B has open tasks, then Activity set A should be triggered.