Test workflow to run without need to create request item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2020 04:16 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2020 12:26 PM
Thanks. Cam I use this in fix script?. Do I need to create new GlideRecord for example sc_req_item everytime I run?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2020 12:38 PM
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!
Muhammad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2020 05:38 PM
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
Muhammad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2020 07:51 PM
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
Muhammad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2020 02:10 PM
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