Video Screencast Help

Searching computers in workflow to run task on

Created: 03 Sep 2012 | 4 comments

Hi,

I have a workflow that runs a task on a computer, I now want to change that so the user can search for the computer and select the computer to run the task on, I have done this with AD to search for a user based on last name, as per workflow swat http://www.screencast.com/t/q83d3a2HLnB. Is this possible or can anyone direct me as to what component can look at the altiris DB/NS to get the details.

 

Many Thanks,

Rufus.

Comments 4 CommentsJump to latest comment

reecardo's picture

You have a few options to fetch computers. There's the Get Items By Type component (generated ASDK component) as well as the Get All Computers component (generated Resource component). Both components are eseentially wrappers of web service methods.

Just remember to use a Create SMP Credentials component upstream from the component before you use them to define which SMP you are hitting.

RufusS's picture

Hi Reecardo,

 

Thanks for the reply, I'm new to workflow and like it allot, but I'm not sure how to display the computer in a web form for the user to select. there is allot of output from the Get all computer component and I can't seem to map that to a single variable or array.

I essentailly want a web form where a use start to type the computer he/she is looking for and click a button search, based on what was entered the results must be displayed in a list box.

Thanks you.

Rufus.

RufusS's picture

Hi,

Ok so thanks to Reecardo I was pointed in the right direction, the Get Items By Name And Type Component together with Get Computers By Ids Component will give me the required out put.

but when I select the computer and click done the dynamic model with in the list box runs again for about 5 times and then the process ends, now when I search for a computer I have to use a wild card '%' and this gives me all the computers with a given name but the process never completes and the Get Items By Name And Type Component together with Get Computers By Ids Component runs multiple times over and over

Is there a way I can stop this from occurring?

reecardo's picture

You can use a component called Get Items By Type (vs. Get Items By Type and Name) if you're just concerned with fetching the basic details (item level) about computers. Basically guids, names, and a few other minor things. There's a timeout property in this component (milliseconds) that you can crank up if it's timing out.

Get Computers By IDs is a good component to use if you have the ID of the computer you need more details about (and the component above does that, handily). One thing to remember with all generated resource components (as this one) is to bring back as few data classes as possible in your ouput so it runs promptly. This is specifed in the Fetch Data With property. Typically, when I have to use these components, I'll only specify the Identity dataclass.