Does it possible to rollback submitted RITM workflows back ward based on the modifications on the submitted RITM form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2019 09:44 PM
Hello All,
I want to rollback the RITM workflow after submitted I will go and modify same RITM form , Is it possible?
Based on the "IT Asset Type" select box type variable my workflow will run
for example IT Asset Type contains two choices
1.IT Standard Asset
2.IT Non-Standard Asset
If I select "IT Standard Asset" it will go for one way and If I select "IT Non-Standard Asset" it will move for another way
Note : if user selected as "IT Standard Asset" and submitted the request later he was realized he has chosen wrong "IT Asset Type", He made changes on the same RITM form instead of "IT Standard Asset" he will be selected as "IT Non-Standard Asset", In this scenario the requested RITM workflow will rollback and will it run for "IT Non-Standard Asset" process.
Many Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2019 10:07 PM
Hi Thanks for the quick reply,
Where can we write the below lines of code, I mean will it be in workflow activity or "sc_req_item" table
var wf = new Workflow();
wf.restartWorkflow(current);//pass current or glideRecord object
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2019 10:46 PM
do you need this as a one time fix or you need to do this forever??
if it is a one time fix
you can do it in background script or fix script
you dont have a way to do this workflow because you cannot predict when will an user modifies the value. workflow restart is preffered only when there is immediate fix needed and no other options to use.
-satheesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2019 10:55 PM
This may not frequently used this scenario will come very rare conditions if unfortunately user has been selected as wrong IT type and he wanted to change IT Asset type to another on priority at that time only it requires.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2019 03:27 AM
I have used below lines of code for restarting the workflow based on the modifications of RITM, but it is not working, Business Rule is working info message displaying but workflow not restarting
var wf = new Workflow();
wf.restartWorkflow(current.sys_id);
gs.addInfoMessage("tetsing rollback");
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2019 11:11 PM