Reputation: 11
Workflow after ticket is submitted:
Short description of the ticket should be the same as the title of the catalog item.
Request is assigned to Security team.
Task A
The ticket is assigned to “CAB Approval” group to verify if access should be granted. When this task is closed task B is generated.
Task B
Ticket is assigned to “help desk” group to give access to the drive. Once task is closed a notification is sent to both Manager and the Employee listed above. When all tasks are completed then the Request is marked as closed.
Upvotes: 0
Views: 831
Reputation: 11
Good afternoon Aadhi,
Great to meet you, and glad you're leveraging the power of ServiceNow!
This is certainly possible.
The workflow will naturally attach to a submitted request per the Cascade Request Approval to Requested Item Business Rule (look at the sc_request table for Name column contains "Cascade" and you'll see the exact name).
You can handle the Short Description and Assignment via a "Set Values" activity or via a Run Script activity:
Then, you can have a "Create Task" activity whereby you can assign it to the "CAB Approval" group ( ref: https://docs.servicenow.com/bundle/quebec-servicenow-platform/page/administer/workflow-activities/reference/r_CreateTask.html ). Select the "Wait for completion" box. As per docs, "If selected, the workflow activity waits for the task to complete before continuing."
Then, after "Create Task" for task A, do another "Create Task" for task B.
If you need to re-assign the parent RITM, you can use another "Set Values" activity or a "Run Script" activity.
Please note that for any "Run Script" activities, please do not use a current.update();. Just use your typical "gr" variable to query for the record and then a gr.update();.
After the second "Create Task" activity, use either a "Notification" activity or a "Create Event" activity which will create an event and, once the event is created, the notification will be fired. Either way on that part will work fine.
Add in a final "Set Values" activity to set "State" to "Closed Complete" and "Active" to "False".
Just after the "Set Values" activity, I'd recommend you also add in a 2 second Timer. This will help prevent racing issues where the system tries to set the values but cannot as the workflow raced to completion before the logic inside the activity could fire.
Cheers, Erik
Upvotes: 1