04-19-2013 03:25 PM
Hi All,
To automate the installation of the Tidal Agent for TES, I'm setting up a workflow in CPO.
The hostnames where the agent will be installed should be an input variable supplied by the person running the workflow.
Here is the variable we’d like to use to identify the target host.
However I’m not able to select this variable in the target tab.
I was wondering if there is some type of conversion we need to do on the input variable so it can be used to define the target?
Thanks!
Solved! Go to Solution.
04-20-2013 04:26 PM
You might be interested in my blog, particularly my "One interface to rule them all" series where I take PO and write a demi-TES API/adapter for the TES Web services as well.
If the name input is the same as the hostname, then like Mike says, do a find targets where the hostname = input.
Another more complete option would be ...
1) take the hostname as an input
2) use the NBWS to dynamically create a windows target to that hostname on the fly
3) use an XPATH query to pull the resultant target GUID from that NBWS call
4) Do a find-target where the Target.Id = Your XPATHed GUID
5) Do your work on the new target
6) delete target if you wish
I use steps 2-4 in *ALOT* of my stuff and it works quite well. You'll find it all over my blog posts too... feel free to email me if you need further info.
04-19-2013 03:35 PM
There are two ways to do this.
First, use the "Find Targets" activity to match target names (string) to your input variable (string). It will return a set of Target objects that you can either loop through (for-each) or can just choose the first or last. First is a good way to do it if you know you'll only have one returned.
The second way is to use the Target Group rules. You can tell the activity to target "all targets of a particular type" and then use a rule to say "where Target.Name = Process.Variables.Input.Target_Name" so that you have a string-string comparison again. This will "broadcast" the activity to run on all targets that match, which of course is a field of one if your target name is a perfect match for the input string.
There are other options, such as picking the target for the process at runtime. I can't see your images in the post above, so I'm just talking about available options.
04-26-2013 03:41 PM
Thank you MIchael for taking the time to respond. To add some complexity here (which I didn't mention), a lot of our provisoning of TAU agents will be on new hosts which are not currently defined in CPO as targets so I'm not sure we can use the find targets activity in this case. I wonder if there is an easy way to dynamically create the target on the fly.. I'm just reading Christopher's response below. I'll give that one a try.
Thanks again,
Prakash
04-20-2013 04:26 PM
You might be interested in my blog, particularly my "One interface to rule them all" series where I take PO and write a demi-TES API/adapter for the TES Web services as well.
If the name input is the same as the hostname, then like Mike says, do a find targets where the hostname = input.
Another more complete option would be ...
1) take the hostname as an input
2) use the NBWS to dynamically create a windows target to that hostname on the fly
3) use an XPATH query to pull the resultant target GUID from that NBWS call
4) Do a find-target where the Target.Id = Your XPATHed GUID
5) Do your work on the new target
6) delete target if you wish
I use steps 2-4 in *ALOT* of my stuff and it works quite well. You'll find it all over my blog posts too... feel free to email me if you need further info.
04-26-2013 03:43 PM
Thank you Christopher (or Shaun?). Looks like you've already done a lot of work in this domain. I'll review your blog posts and we definitely should work together going forward.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide