Stuff like this is done all the time. However seldom with the wft_deploy.ipl script. This requires a custom deployment script, which you need to write. I hope you know Perl well enough, through the deploy.ipl you are using away and start coding.
There are quite a few ways you can do this. One of the many ways to do this could be to simply figure out which WA is deploying the file and based on that execute OD deployment with different OD configuration file. If you are using the OOTB wft_opendeploy.ipl, you may have to customize that or you may be better off with writing your own custom perl script or Java code.
Hi vpatel,I have to deploy from diffrent 500 workareas.there will b only one generic workflow.depending upon the value of WORKAREA i have to chose appropriate UAT and LIVE server deployment (OD cfg file which will conatin the deployName)
Thanks for your replyI am not great expert in perl.Can you please through some detail steps which i have to do follow.
my $rootnode = TeamSite:CRnode->new($xml); my @properties_container= $rootnode->get_node_list(DCR_ELEMENT); my (@keyarray, @valuearray, %hash); ##Need to loop twice inorder to get both Key and values items from DCR, probably TeamSite:CRNodes limitation, Down to line better to use XML::XMLPath. #First iteration to get all the keys values in the array from DCR @keyarray = map { $_->value('key') } @properties_container; #Second iteration to get all the values value in the array from DCR @valuearray = map { $_->value('value') } @properties_container; @hash{@keyarray} = @valuearray; return \%hash;
Is it just me or does that solution seem a tad overly complicated for the problem?
Sometimes the solution will be complicated for the requirement and customer expectation to achieve generic solution
...##Need to loop twice inorder to get both Key and values items from DCR, probably TeamSite:CRNodes limitation, Down to line better to use XML::XMLPath.#First iteration to get all the keys values in the array from DCR@keyarray = map { $_->value('key') } @properties_container;#Second iteration to get all the values value in the array from DCR @valuearray = map { $_->value('value') } @properties_container;@hash{@keyarray} = @valuearray;...
...$hash{$_->value('key')} = $_->value('value') foreach @properties_container;...
...my $hash = map { $_->value('key') => $_->value('value') } @properties_container;...
I'm still trying to understand why you think this is necessary:...##Need to loop twice inorder to get both Key and values items from DCR, probably TeamSite:CRNodes limitation, Down to line better to use XML::XMLPath.#First iteration to get all the keys values in the array from DCR@keyarray = map { $_->value('key') } @properties_container;#Second iteration to get all the values value in the array from DCR @valuearray = map { $_->value('value') } @properties_container;@hash{@keyarray} = @valuearray;...Instead of something like this:...$hash{$_->value('key')} = $_->value('value') foreach @properties_container;...Or...my $hash = map { $_->value('key') => $_->value('value') } @properties_container;...Either would have the same end result with less processing and less space wasted for unnecessary variables (you could probably even get rid of @properties_container).Then of course there's the question of whether you really want to maintain this in a DCR or just use a basic XML file for managing the mapping of branches to deployment specifications.Whether or not you can just use simple substitutions in a generic deployment configuration file or need to use distinct deployment configuration files depends on whether all the deployments are identical except with respect to the target node(s). You might be able to parameterize other differences too and include such information in your mapping file, but if you have to start dealing with different filters and other options (permissionRules, transferRules, etc.) being different - you're probably better off with distinct config files and just mapping the branch to the config instead of to a set of command-line parameters to be passed to a generic config -- all of this is, of course, subject to the actual needs of the implementation - which we don't have, so we're just making guesses. Hopefully vikasp has sufficient information now to make an informed decision about how to implement something for the customer.