Using Flow Designer to update CI's

Darlene York
Tera Contributor

Hello,

I am trying to use flow designer to update the Life Cycle Stage and Life Cycle Stage Status when a server is being replaced.  I'm am using Update record and the variable is old_ci that is mapped to the configuration items.

Action - Update Record

Get Catalog Variable - old_ci

server [cmdb_ci_server]

Life Cycle Stage - End of Life

Life Cycle Stage Status - Retired.

 

Its not working, nothing is updating.  

Any help would be greatly appricated.

 

 

1 ACCEPTED SOLUTION

Erik Nelson
Kilo Sage

Hi Darlene,

 

I just tried this out in my PDI and it looks like it's failing to update due to the Business Rule "Validate lifecycle combination" on the cmdb_ci table. It runs when either the Life Cycle Stage or Life Cycle Stage Status is updated. This calls the Script Include "LifeCycleUtil" which handles making sure it's a "valid" combination of entries for the field.

 

If you haven't already, I'd suggest enabling Flow Reporting through Flow Designer Properties to at least "Flows Actions and Steps" as that will aid in displaying where errors might occur.

 

Erik

View solution in original post

13 REPLIES 13

Erik,

I see the business rule is stopping it.  What I find strange is, I can manually update a ci to end of life and retired and it accepts it.  

 

DarleneYork_0-1681313483353.png

 

It's likely/possible that a manual update runs other things in the Script Include that aren't triggered by the Flow update. Does it let you do one update at a time via the Flow? So try updating just Life Cycle Stage, then a second update for Life Cycle Stage Status?

Thats a good question.  I will try that.

Jim Gannarelli
Tera Contributor

Hi Darlene, did you ever get a resolution to what you were trying? I'm trying to do the same things too: setting up a flow where someone is approving a new application to be put in use, so I want to set it to operational and other flip side, I want to set up a retirement procedure that will set the lifecycle stages correctly upon an approval of the business app's retirement. Would be great to find out how to execute such an action in flow designer even if it is via another action or subflow that comes from ServiceNow instead of just the "update record" function.

 

Thanks!