How to restart the Workflow from UI action when clicking on UI button " Reopen RITM" in the RITM form ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2022 04:51 AM
I have created a UI Action for reopening the RITM as below
current.state = 1;
current.stage = "waiting_for_approval";
new global.Workflow().restartWorkflow(current, true);
current.update();
action.setRedirectURL(current);
Reopening the RITM by clicking on the button when the state is closed complete.
Once clicking on button, the state is changed to open
When clicking on Reopen RITM button on RITM form , the workflow should restart but its not getting triggered as per its functionality such as approvals, tasks. It remains as closed complete and approvals as approved. The state is not reverting to Requested.
Can anyone help me out in this requirement ?
Regards,
Dharani.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2022 09:31 AM
Your code seems alright to me.
Did you try:
new Workflow().restartWorkflow(current);
lol, just trying without global and the parameter true.