Video Screencast Help

Workflow: How can I get assets assigned to a user?

Created: 06 Aug 2013 • Updated: 15 Aug 2013 | 4 comments
This issue has been solved. See solution.

This should be easy and it seems like the built-in compents should do this, but I need to get a list of all assets owned by a user from SMP 7 and I have the user's Active Directory info (ADUserInfo).  Was thinking I could use the "Common Name" attribute and map that to the "Name" attribute in the Get Assets for User component editor but not so much.  Errors out stating the guid (all zeros) is invalid.

Aside from manually querying my CMDB with SQL in Workflow, does anyone have any good solutions?

The context for this is that I'm trying to automate our offboarding process and need to provide the person filling out the form (HR) with a list of all company-owned assets the selected user has in their possession.

Operating Systems:

Comments 4 CommentsJump to latest comment

b3tts32's picture

After a few tries with this component I finally got it to work by hardcoding a guid from the vRM_User_Item table. I would assume there is a component that could pull this info for you but I didn't see it.

I know you mentionend you didn't really want to query the cmdb with SQL but I find it to be a lot faster for my processes overall. In general the components are wrapped around web services that end up hitting sql so you're just skipping a few steps. 

If nothing else you could query the vRM_User_Item table then just pass the guid to the Get Asset for User by ID component.

b3tts32's picture

The Get User by User ID and Domain will get the correct GUID for you. Just put this before your asset component and pass it the result and you should be in business.

SOLUTION
dfrancis's picture

I got your solution to work, but I see what you mean how ugly this is.  I noticed the list it spits out isn't exactly display friendly, so I think I'm going to go the SQL route and either toss some customized stored procedures in there that I can pass an Active Directory user ID to or do a custom SQL query.

Now it's time to pull up the workflow swat videos on doing SQL queries ;)

--Dave

If a forum post solves your problem, please flag it as a solution. If you like an article, blog post or download vote it up.

michael.george's picture

*Edit Yes, the above (from b3tts32) worked fine for me. I was able to map the output from the "Get user by id and domain" component to an AltirisOutput7.User data type (as the ID field) and it worked like a charm!

If a post solves your issue, please mark it as a solution. It makes these forums better for everyone.