Best way to set database instance's status as retired automatically?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2022 07:33 AM
I am trying to understand how can i set the status of the Database Instances as retire, when they are running on retired servers. The status of the server is getting changed to retired by a human operator on my company but the CI's which run on it (Database Instances, Application Servers) won't update their status as retired automatically, at least on my Servicenow installation which is fully OOTB.
From what i saw, i could try to use Flow Designer to identify the Database Instances connected to the retired servers
but i don't know how to select the Database Instances from this result : the result is, of course, only relationship records.
Has anyone developed something like this or has an idea about how it can be done?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2022 08:12 AM
Since you are using Flow Designer, you can just use the Update Multiple Records action instead of Look Up Records. A Business Rule can be used to accomplish the same thing. It all depends on your needs and/or preferences.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2022 08:49 AM
Hi Claude D., the problem is that i can do the Update Multiple Records action or the Look Up Records only on the Relationships table while i am looking for a way to update the Database Instance table.
What i mean is within the query on the Relationships table i can check the Parent or Client fields but i can update only the fields of the table i am using for the query (Relationships table), not the Database Instance.
Could you suggest me a way to update the Database Instances table? I just cannot understand how can i do it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2022 09:11 AM
Hi Claude D., the problem is that i can do the Update Multiple Records action or the Look Up Records only on the Relationships table while i am looking for a way to update the Database Instance table.
What i mean is within the query on the Relationships table i can check the Parent or Client fields but i can update only the fields of the table i am using for the query (Relationships table), not the Database Instance.
Could you suggest me a way to update the Database Instances table? I just cannot understand how can i do it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2022 10:01 AM
Got it. You could go back to your original method of looking up records and add some more logic.
- After the Look Up Records step, add a For Each Item in <table> Records flow logic step.
- Then, add an If statement flow logic to check if the Database Instance in the record being evaluated is Retired.
- You can dot-walk to the table for evaluation.
- Under the If statement, add the Update Record step to perform the action on the desired table record by dot-walking like you did in the above step.
In the image below, I'm pulling the data pills over with data from previous steps to evaluate or perform actions on. The pills with black arrows on the left indicate you can dot-walk to sub-data.
I hope this helps!