I have one requirement like two catalog task should be created for the request.(workflow )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2022 10:12 AM
I have one requirement like two catalog task should be created for the request.(workflow ).
So i configured workflow like two task created from workflow and then 2nd task close completed then setting the ritm state to Intial review,if close in completed then setting the ritm state to pending intial
From workflow am creating the two task.
first task created ritm state set to "pending Intial" and one this one completed second task should created and ritm state set to "Pending task approval" after that If 2nd task close completed then setting the ritm state to "Intial review" .If close in completed then setting the ritm state to "pending intial" redirecting to first task it will open.
But now i want to change the flow like
First task should be created from workflow,then ritm state set to "pending intial".After that I have created ui action button from first task form to generate second task. Once i will click that ui action should be generated second task - up to here its working .
form this point how can i achieve this --
then ritm state set to "Pending task approval".and first task should be close.After that If 2nd task state is close completed then setting the ritm state to "Intial review" .If second task state is close incompleted then setting the ritm state to "pending intial" redirecting to first task (state will open).----how can achieve this way if any suggestion it would be great.
this is ui action -create second task in first task form
//Ensure call to server-side function with no browser errors
if(typeof window == 'undefined')
runServer();
//Server-side function
function runServer(){
var task = new GlideRecord('sc_task');
task.initialize();
task.short_description='QC Specialist receives request from DMS reviewer';
task.assignment_group='45dd9d2b2fe241104f3e2ca62799b6ea';
task.request_item = current.request_item;
task.u_state='Pending Approval';
task.insert();
action.setRedirectURL(current);
gs.addInfoMessage("Task has been created:"+task.number);
}
Any suggestion would be appreciate
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2022 12:49 PM
Hi,
Why are you using UI action to create 2nd catalog task.? Instead use flow designer and check whether 1st task is completed or not if completed then create new catalog task.