Hi All,
I am working on a business adapter to import device assets with life cycle updates from an internal workstation inventory tool.
One requirement is to set the device location to that of the user assigned. I can match user in the business adapter without an issue. I do not know how to capture the matched User's locationid and assign to the target device asset.
I tried using custom query with no luck.
Any one have any suggestions on how to make this happen within the business adapter? I am finding the business adapters really limiting compared to other ETL tools.
‎Aug 25, 2020 12:03 PM
Hi,
ID-based assignment can be tricky in Business Adapter Studio. It should work if you get the users location's complete path (from your query) an then match the location object based on that in BAS.
Best regards,
Markward
‎Aug 25, 2020 12:32 PM
Yes, I don't think your approach would work.
If you have FNMS On-Premises, then you can create a SQL Query against the Compliance Database as your input to the Business Adapter.
Find active inventory devices and get the Location assigned to the inventory device, and then get the associated User of the inventory device and the Location assigned to the User. Filter the query to only return Inventory Devices where the location is not equal to the location of the User.
The business adapter can then match on the User's Location and to the Inventory Device, and then update the location of the Inventory Device to the User Location.
‎Aug 25, 2020 01:58 PM
If you are using FlexNet Manager Suite On-premises and have the ability to run a query against the compliance database (for example, in a business adapter or through some other approach), you can brute force setting the location of all asset records to match the location of the assigned user with a SQL query like the following:
UPDATE a
SET LocationID = cu.LocationID
FROM dbo.Asset a
JOIN dbo.ComplianceUser cu ON cu.ComplianceUserID = a.AssignToUserID
WHERE a.LocationID != cu.LocationID
I can't think of a way to achieve a similar outcome using the record import capability in business adapters (i.e. except for configuring a custom SQL query to be run in the adapter).
With that said, do consider whether this is a good thing to do from the perspective of your organization's hardware asset management practices. Best practices for hardware asset management would often include tracking hardware location changes through IMAC (Install Move Add Change) lifecycle activities, not just blindly assume the location of an asset changes with the user.
‎Aug 25, 2020 09:38 PM
Chris, agreed on policy.
We have IMAC changes coming in from a separate system.. Unfortunately, that system is not passing a location. I was hoping to look up the user and set the location to the users location when the machine is assigned. The team can later go in and move to another location if not matching the assigned user.
Can the custom query take a value from input to use as criteria?
General Process flow of adapter:
SQL Query for IMACs -> Custom Query to get user location -> update FNMS
‎Aug 26, 2020 02:29 PM