Test workflow to run without need to create request item

Giri6
Tera Expert

I need to test the workflow.  I have hardcoded data in runscript to start. Is it possible to test workflow without having to create a catalog item and assign workflow and then create RITM? Appreciate it. If not any shortcuts to test workflow to minimize steps as much as possible.

11 REPLIES 11

Thanks.  Cam I use this in fix script?. Do I need to create new  GlideRecord for example sc_req_item everytime I run?

Hi Giri, 

Yeah. You can use it in any server side script i.e Fix script, background script, Business rule or Scheduled job etc. yes you need to create GlideRecord object for sc_req_item and pass it in the startFlow function as a second parameter. 

 

Please mark this accepted and helpful if your question has been answered. Thanks!

Regards,
Muhammad

Hey Giri,

 

It would be great if you mark my response as accepted and helpful if your question has been answered so that it can be added to answered list and others can be benefited by this. Happy Learning!

 

Thanks & Regards,

Sharjeel

Regards,
Muhammad

Hey Giri,

 

It would be great if you mark my response as accepted and helpful if your question has been answered so that it can be added to answered list and others can be benefited by this. Happy Learning!

 

Thanks & Regards,

Sharjeel

Regards,
Muhammad

DirkRedeker
Mega Sage

Hi

If you want to test scripts, that use a current record, you can "simulate" in Scripts Background, by just naming your GlideRecord variable as "current" an put the query to open it in front of the code.

Let me know if that answered your question and mark my answer as correct and helpful

BR Dirk