flow designer and Create UI action on Vulnerability Tasks to automate creation of hardware requests
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2025 06:30 AM
Hi ServiceNow Experts,
We are working on implementing a **UI Action** on the `u vulnerability task` table to initiate a hardware replacement process, and we need help in designing the associated Flow in **Flow Designer**.
Here is what we've already done:
1. **Created the UI Action**
- The UI Action triggers a "Hardware Request" catalog item submission with the following details:
- **Requested for**: Configuration Item Assigned to (or current user if empty)
- **Request Type**: Security Replacement
- **Shipping Details**: Required
- **Reason for Request**: Includes details of the Vulnerability Scan Task (e.g., parent task number)
- Updates the task with the Requested Item (RITM) number in the "Remediation Task" field, and sets other fields like `Solution` ("Replace the device") and `State` ("Pending"). The request submission works as expected.
2. The Flow needs to begin once the UI Action is triggered and the catalog item (RITM) is created.
**Here's what we need help with:**
Call new Flow “Vulnerability Task Hardware replacement
This flow should run for the ‘Vulnerability Scan Task’ record where the UI is called on
Wait for the status of the “Remediation Task” (RITM) request is closed (active = false)
IF Closed Skipped or Closed Incomplete
Add Worknote to triggering Vulnerability Scan task record
“Hardware Request #REQUESTNUMBER# has been closed without being completed. Please review.”
End Flow
If Closed Complete
Look up record for the “Hardware Return” RITM made for the User (one should be made at the end of the hardware Request RITM lifecycle)
If none found
Add Worknote to triggering Vulnerability Scan task record
“Hardware Request #REQUESTNUMBER# has been closed but no hardware return request could be found. Please review.”
End Flow
If found
Add Worknote to triggering Vulnerability Scan task record
“Hardware Return #RITMNUMBER# has been created for the Vulnerable device to be returned.”
Make #RITMNUMBER# a click-able link back to the ritm (we have a custom “create URL” that can be used to make this clickable link. output from the action is “code”)
Wait until Hardware Return RITM is closed
IF Closed Skipped or Closed Incomplete
Add Worknote to triggering Vulnerability Scan task record
“Hardware Request #RITMNUMBER# has been closed without being completed.”
End Flow
IF Closed Complete
Add Worknote to triggering Vulnerability Scan task record
“Hardware Return #RITMNUMBER# has been completed and the device has been returned to the Hardware Team.”
End Flow
Set the Vulnerability Scan Task to Closed
Any guidance, sample flows, or advice would be greatly appreciated!
and we attached the screenshot
Thank you!