How to restart a workflow from UI action
						
					
					
				
			
		
	
			
	
	
	
	
	
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
09-30-2020 11:16 PM
Hi,
Could you please tell me how to restart a workflow from UI action?
Have used below script:
UI Action
Table:sc_req_item
new Workflow().restartWorkflow(current, true); 
current.state = '1';
current.update();
action.setRedirectURL(current);
This script restarts the workflow,but the issue is if there are 2 levels of approval and 1st level of approval is approved and 2nd is requested, when this UI action button is clicked 1st level of approval is still in approved state. I want to restart the approvals as well.
Kindly request you to suggest solution for this.
Regards,
Yashaswini
- Labels:
 - 
						
							
		
			Service Catalog
 
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
10-01-2020 12:19 AM
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
10-01-2020 12:42 AM
Also tried using Roll back to activity in workflow.
This set the approvals 1st level to requested and 2nd level of approval to not requested.
When I again approve the 1st level, the workflow is cancelled.
Please suggest solution for either of these
Regards,
Yashaswini
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
10-01-2020 12:42 AM
Also tried using Roll back to activity in workflow.
This set the approvals 1st level to requested and 2nd level of approval to not requested.
When I again approve the 1st level, the workflow is cancelled.
Please suggest solution for either of these
Regards,
Yashaswini
