04 July 2007

Changing the status of non-active computer resources to Active when Inventory Solution data is received

Retired computer resources will have their status automatically changed to Active by the Notification Server if Inventory Solution data is received. Computer resources with statuses other than Active or Retired do not. This functionality is desired.


Cause
The automatic changing of the status to Active is dependent on the current status of the computer resource.


Investigation using Notification Server 6.0 SP3 R5 and Inventory Solution 6.1 SP2 (6.1.1075) returned the following results:




In summary, statuses of Disposed, Retired, and Returned to Lessor will revert to Active once Inventory Solution data is received. This Inventory Solution data will only be sent if the configuration policy received by the client computer while in the Active status contained the Inventory Solution tasks. That is, while a new configuration policy will not be sent if the status is anything other than Active, the client will continue to use the old policy that is currently in place.
Statuses of In Stock, Missing, On Order, RMA, and any custom statuses are static. They must be manually changed or changed via the method outlined in the resolution below.


Resolution
Create a notification policy that will set the status to Active on any computer resource whose status is other than Active, Retired, Disposed, or Returned to Lessor and has recently sent Inventory Solution data to the Notification Server.
The following query can be used in the notification policy to select computers who have sent Inventory Solution data within the last 7 days:
SELECT vfars.Guid, i.Name, vfars.Status, acir.[Collection Time]FROM vFixedAssetResourceStatus vfars JOIN Item i ON vfars.Guid = i.Guid LEFT JOIN Inv_Aex_AC_Inventory_Results acir ON vfars.Guid = acir._ResourceGuidWHERE vfars.ResourceTypeGuid IN (SELECT ResourceTypeGuid FROM vResourceHierarchy WHERE BaseResourceTypeGuid = '493435F7-3B17-4C4C-B07F-C23E7AB7781F') AND vfars.Status NOT in ('Active', 'Retired', 'Disposed', 'Returned to Lessor') AND DATEDIFF(DAY,acir.[Collection Time], GETDATE())

No comments: