3 Replies Latest reply on Mar 6, 2014 10:50 PM by Ian Butler

    CITRIX Transaction - Deployment options

    Ian Butler

      Fellow TMART'ers,

       

      BMC ART 4.2 SP1  - CENTRAL Windows 2008 R2

      Remote Execution Servers - Windows 7

       

      I have a requirement to publish a Citrix recording/transaction to multiple locations. All good and very easy to do, however........

      For each Remote Execution Server, I wish to use different credentials within the Citrix Transaction to logon with.

      Example

      (Based in Australia)

      NSW - use NSWID

      QLD - use QLDID

      WA - use WAID

      VIC - use VICID

      There are multiple reasons for doing this. I'd also like to reuse the same transaction to ensure consistent results regardless of location.

      As the password is encrypted within the transaction, I'm unsure how to modify each Transaction to use different credentials.

      Any easy ideas on how best to do this other than record NEW scripts for each location and credentials?

       

      Hope this makes sense??

        • 1. Re: CITRIX Transaction - Deployment options
          Flavio Bonacordi

          Hi,

          Maybe the solution that I got in the past (and I got that solution in this community) you can try the following.

           

          1st - Have your users / password as project attributes

          2nd - Add the GetMyLocation.bdh to your project to add the ability to "recognize" your execution server.

          3rd - Create logical IF to check which execution server is executing the script and based on that use the correct project attribute.

           

          How to use the GetMyLocation.bdh (save the code listed below in a file called GetMyLocation.bdh inside the your WORKING\CUSTOM INCLUDE folder)

           

          OBS: Please note that I customized the IF creating a friendly name that I can use into my start/stop measures.


          - add the USE GetMyLocation.bdh in the top of your code.

          - declare a string like sLocation    : string; in your var session.

          - call GetMyLocation(sLocation); in your begin session that will return the current execution server.

           

          var
             sLocation   : string;
             
          dclfunc
             function GetMyLocation (sNewLocName : string)
          begin
              sLocation := GetController();
          //    print ("My Location is " + sLocation);
              
              Substr(sLocation, sNewLocName, 1, 3);
              if sNewLocName="HOE" then
                sNewLocName:="Houston";
              elseif sNewLocName="DAL" then
                sNewLocName:="Dallas";
              elseif sNewLocName="LHD" then
                sNewLocName:="Leatherhead";
              elseif sNewLocName="SNG" then
                sNewLocName:="Singapore";
              elseif sNewLocName="CGY" then
               sNewLocName:="Calgary";
              elseif sNewLocName="CTC" then
                sNewLocName:="Curitiba";
              elseif sNewLocName="MLB" then
                sNewLocName:="Guinea Equatorial";
              else
                sNewLocName:=sLocation;
              end;  
          //    print ("My NewLocation is " + sNewLocName);
          end GetMyLocation;
          


          Let me know if you need any help on that.

           

          PS: Or you can simply add the GetController() function into your code. I add that into a CUSTOM INCLUDE because I using it in ALL my scripts.

           

          Ping me if you need.

          1 of 1 people found this helpful
          • 2. Re: CITRIX Transaction - Deployment options
            Hal DeVore

            Very nice, Flavio Bonacordi!

             

            Ian Butler, what Flavio has described is a good approach.

             

            If your locations are likely to change you can also put the credentials into a CSV or XML file.  Add the file as a "data" file to your Workbench project and it will be distributed to your Execution Servers.  BDL has a robust set of functions for reading and extracting data from CSV and XML files.

             

            --Hal

            1 of 1 people found this helpful
            • 3. Re: CITRIX Transaction - Deployment options
              Ian Butler

              Guys, thanks very much for your prompt response.

              I actually like both options!!

               

              It will be more about what works for us in the long term, which might sway me to look into your Data file option Hal.

               

              Appreciated.