HRSD Lifecycle Events - task created from a subflow is not attached to Activity Set on portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2025 11:21 AM
Hello fellow developers,
I've ran into an issue while trying to construct a Lifecycle Event in ServiceNow HRSD.
Because of the complexity of the expectations, I have to create some tasks from a subflow, which I trigger from an Activity. The tasks are created all right but ServiceNow does not handle them like tasks created by an Activity directly - when a user opens their Journey from the Employee Portal, the tasks created by the flow show up under "Other tasks", they are not under the proper Activity Set. And this is confusing as the progress of the Journey is not clear, "Other Tasks" always show up at the bottom of the list even after they are completed.
The problem is that I'm unable to properly attach the flow-created tasks to the Activity Set they belong to. They are set to belong to the right Lifecycle Event Case (through the tasks' "parent" field) and there is also an "Activity" field on the task record, which I set to the activity that triggered the creation of the task (this is a reference field to the Activity base [sn_hr_le_activity] table). However, nothing happens, the task is still under "Other tasks".
Did I miss to set an important field during task creation? I read that unless the task is created by the so-called Activity Engine, the system cannot handle it properly and that's why it is added to the "Other tasks" category. But I haven't been able to find a solution to creating a task from a subflow in the way the Activity Engine does. (There should be a way if an Activity is allowed to trigger a flow and I guess it's not uncommon to create tasks from it...)
Please share if you have any ideas on how to solve this or push me on the right track if I missed something. (I experienced this on Xanadu, now I'm upgrading to Yokohama to see if that solves the issue).
Thank you!
- Labels:
-
Human Resources Service Delivery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2025 07:27 AM
Hi @karoly_gersi !
Can you share more details about the specific tables and fields that you are using on the journey/journey task/journey stage side?
For context, it makes a big difference on the table/tasks that you use due to the many dependencies on the journey side. For example - if you are doing journey tasks it is important it properly reference, the journey -- and then from there that the journey reference the other journey components downstream (e.g. sn_ja_stage).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2025 04:58 AM
Hi @JT8 ,
Thank you for the reply.
Since the Activities create tasks in the HR Task [sn_hr_core_task] table (among others) so I thought I could imitate that through a subflow by providing the Parent and the Activity fields.
I expected the Activity field to solve the problem because it can be set to the "Activity generating this task" as the field's help text says.
However, based on your reply I checked the table structure through the Schema Map and found that there in fact is a reference to the Activity Set in the HR Task table - the tricky thing is that it's called "Stage". 🙂
Okay, it is kind of logical now but I missed it so far. The point is, when I set it to the relevant Activity Set it works as expected!
Thank you very much for the hint!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2025 06:21 AM
Glad my note was helpful @karoly_gersi !
And thank you for sharing your results - it's helpful to learn how others approach tasks in Journeys!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2025 01:03 AM
Hi @karoly_gersi and @JT8
Looking for some guidance here, it seems like you were able to use a subflow from an activity/
How can I correctly trigger a flow or subflow with input parameters from a lifecycle event activity in ServiceNow, specifically at a defined point in the activity set?
The trigger part is simple, le activity will do that. but I am confuse about the input params.
Specifically, I want all the params from the parent case to create some complex logic in the flow to trigger additional tasks and stuff based on regions from cmn_location.
can you please help?
thanks.