Adding an approval to a catalog task using a workflow .

Servicenow-user
Mega Explorer

How do i add an approval to a catalog task using a workflow .I also need to auto close the task once the approval is approved or rejected.

1 REPLY 1

varaprasad123
Kilo Guru

https://www.servicenow.com/community/now-platform-forum/in-flow-designer-how-to-add-approvals-for-ca...

 

This link has some info on creating approvals for catalog task on flow, you have to find similar activities in workflow incase if you are going with the workflow.

 

second part of the question can be achieved with scirpt

if (current.approval == 'approved') {
    current.catalog_task.state = 3; // 3 represents "Closed" state in ServiceNow
    current.catalog_task.update();
}
else if (current.approval == 'rejected') {
    current.catalog_task.state = 7; // 7 represents "Canceled" state in ServiceNow
    current.catalog_task.update();
}