LifeCycle Event vs Workflow

JohnnySnow
Kilo Sage

Hi Team,

 

I have created a record producer in my project related to HRSD module. In my earlier projects I have created catalog items and workflows for it. 

I'm confused as to when do I use a workflow and when do I use a Lifecycle event? It looks like we can achieve the same thing using both. Correct me if wrong, I'm new to HRSD and lifecycle events

 

Thanks
Johnny

Please mark this response as correct or helpful if it assisted you with your question.
3 REPLIES 3

Amit Gujarathi
Giga Sage
Giga Sage

HI @JohnnySnow ,
I trust you are doing great.

When the API returns a status code of 302, it indicates that the request is being redirected to another URL. However, when you execute the API using RESTMessageV2's execute() function in ServiceNow, it returns a 404 status code, indicating that the new URL is not found and no cookies are present.

To address this issue, we need to prevent the automatic redirection when encountering a 302 response. We can achieve this by modifying the RESTMessageV2 configuration.

You can add the following code snippet before calling the execute() function to disable automatic redirection:

 

var request = new sn_ws.RESTMessageV2();
// Set up the REST message properties
// ...

// Disable automatic redirection
request.setFollowRedirects(false);

// Execute the REST message
var response = request.execute();

 

 


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



Hi @Amit Gujarathi , I guess you have posted a solution for different question from the community 😄 .

Thanks
Johnny

Please mark this response as correct or helpful if it assisted you with your question.

Shwetank2
Tera Contributor

Hello @JohnnySnow  

Catalog items and their workflows in ITSM are somewhat different from Record producers in HRSD.

If you want your HR Service to be available for employee self-service, configure a record producer so that the service appears as an HR catalog item in the HR service catalog on the ESC portal.

In simple words, if you want the employee to raise a case on its own via the portal you should be configuring the HR Service to include the record producer.

Submitting a record producer automatically generates an HR Case which will use the OOTB HR case creation workflow in the backend if type is manual.

Looks like you are confused with the fulfillment type on HR service if I have understood correctly

Shwetank2_0-1685000180999.png

Would suggest to use type a manual for your HR service unless you want specific workflow for your HR Service which can not be achieved by the ootb workflow for your HR Cases.

We use type as Lifecycle event when we want to trigger a lifecycle event from the record producer like new hire onboarding, parental leave of absence etc.

Please go to HR Service Configuration from your left navigation panel and view all the OOTB HR services with different fullfillment types which will give you more idea on this.

Thanks
Shwetank