In Lifecycle event, how to trigger an activity from other activity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2025 11:12 PM
I am creating a Lifecycle event and there I have an activity, where the manager (opened by) has to answer to a question Yes or No. If the answer is Yes, an other activity should be triggered with specific questions.
For example:
Manager has to order a parking permit for the new employee (before the employment start date of the new employee). First the manager has to answer, if parking permit is needed. If yes, after that the manager will have a new activity (record producer) to fill in the details of the parking permit. If parking permit is not needed, the manager does not have the second activity .
How to create this kind of connected activity in Lifecycle event? I have read instructions about 'Triggering an activity from upstream activities' (https://www.servicenow.com/docs/bundle/xanadu-employee-service-management/page/product/human-resourc...) but I do not understand how to create this technically.
I created an employee form for the first Yes/No activity and for the second activity I created a form with Record producer where to fill in the details of the parking permit, but how can I connect these two activities so that the second activity shows up only if the answer is Yes for the first activity.
Thanks for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2025 11:26 PM
Hi @Tiina
In ServiceNow Lifecycle Events, you can trigger an Activity from another Activity using different approaches, depending on the requirement. Here are a few ways to achieve this:
1. Using Conditions in Activity Configuration
- If the second activity should start based on the completion of the first, you can set conditions in the second activity’s "When to Run" section.
- Example: Set the Trigger Condition in the second activity as:
- Trigger when: Another activity is completed
- Activity completed: Select the first activity
2. Using Script in an Activity (Flow/Workflow)
- If you need more control, use a Script Action in a Flow Designer or Workflow to start another activity.
- Example: In a Custom Script within an activity:
var activity = new GlideRecord('sn_hr_le_activity'); activity.initialize(); activity.name = 'New Activity Name'; // Specify the activity name activity.hr_case = current.hr_case; // Link it to the same HR Case activity.insert();
3. Using HR Task Dependencies
- If the activity is tied to an HR Task, set up dependencies so the next activity starts when the dependent task is completed.
4. Using Flow Designer - Subflow
- If the first activity is part of a Flow, you can call another subflow or use a "Trigger a Flow" action.
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.
********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect
Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2025 11:49 PM
Thank you for your answer. In Lifecycle event activities, there is no field for trigger configuration.