There is No data for me in Orphan graph. Can you suggest anything here ?

Very helpful, completed and task validation successful!

 

Thank you

omarali
ServiceNow Employee

A simpler workflow version would be just to use the Set Values activity with the following string substitution

Short Description = Workflow launched for task number ${current.number} 

 

find_real_file.png

find_real_file.png

find_real_file.png

Thanks Omarali, since this is a workflow with some script logic, there are multiple ways to achieve the same result. For our purposes, we try to display using scratchpad and a run script, only for scalability by setting all variables in the first activity. In large workflows, having all the variables captured in one activity can help for maintenance or update purposes. But what you show is perfectly acceptable. Thanks. 

Manuel Stimac
Mega Sage

Here is what I tried

Created a workflow

- Name: Remediate Orphan WF
- Table: Orphan CI Remediation [orphan_ci_remediation]
find_real_file.png

Added 2 Core actions:

- Run Script
- Set Values
find_real_file.png

Connect the actions

  1. Begin
  2. Run Script
  3. Set Values
  4. End

find_real_file.png

Action: Run Script

workflow.scratchpad.currentnumber = current.number;

find_real_file.png

Action: Set Values

Short description 

Workflow launched for task number ${workflow.scratchpad.currentnumber}

find_real_file.png

Finish your workflow

Do not forget to Publish your workflow!

find_real_file.png

After the workflow is finished Create a CMDB Remediation Rule.

Create a CMDB Remediation Rule

find_real_file.png

- Name: Remediate Orphans
- Task type: Orphan CI Remediation
- Execution: Manual
- Workflow: [Your workflow name] "Remediate Orphan WF"

find_real_file.png

Set Health Preferences

find_real_file.png

 In the category "Health Metrics" select "Orphan" Metric and activate "Create Task"

find_real_file.png

Last steps

Follow the steps 4 & 5 in the learning course and your task will be updated as following:

find_real_file.png

Happy learning!

 


If my answer helped you, please mark it as Helpful/Solution.
Thanks & many Regards - Manuel