Does it possible to rollback submitted RITM workflows back ward based on the modifications on the submitted RITM form?

Shantharao
Kilo Sage

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

14 REPLIES 14

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

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

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.

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

Pass the current object not sys id