cancel
Showing results for 
Search instead for 
Did you mean: 

Environment Variable Extract

HarshilMehta
Level 4
How can I extract environment variables to excel or some sort of file? I have lot of env variable and need to log them in documentation. Any easy way to extract the list from blue prism? Thanks in advance.

------------------------------
Harshil Mehta
Solution Designer
Deloitte
America/Toronto
------------------------------
13 REPLIES 13

HarshilMehta
Level 4
Unfortunately, there is no direct way. I found a work around. Use the SQL Server Import Export Data tool > Choose Data Source: SQL Native Client > Login using SQL credentials you have and select the BP database > Choose Destination: Flat File Destination and choose location you want to save this txt file > Configure Flat File destination: Source table - [dbo].[BPAEnvironmentVar] > Run.

At the end it should give you full extract in text file. You may play around with the Destination file format to get extract in right format. 

PS: You can also use this data import export tool to change the data. Be very careful though. The only other way to change data is through SQL Server.

Appreciate any other suggestion. Thanks 🙂

------------------------------
Harshil Mehta
Solution Developer
Deloitte
America/Toronto
------------------------------

Hi Harshil,

I would suggest if you are using more than 5 global/environment variables​ then try to make a one simple config / excel file and maintain there itself.
and it is easy to maintain, edit, and also no one can touch/or change them because you can save that file in some particular location for the process where you have your other folder structure like inputs, outputs etc.
In the beginning of process, only you have to read the file and create global data items and initialize it.
I this case you have to create only one environment variable for config file path. 

This is only the alternate approach and suggestion.




------------------------------
Mahesh Kushare
Sr. Consultant
Capgemini Solutions Canada Inc
Toronto
2269886490
------------------------------

Hi Mahesh, 

Thank you for sharing the suggestion. This is a good idea, but it is like adding an additional dependency. Also, it becomes very tricky when we work in multi developer environment. For now, we will have to just stick with extraction from database directly. We will think about using excel for future engagements. 

Once again thank you for sharing the suggestion. Appreciate it! 

Regards,

------------------------------
Harshil Mehta
Solution Developer
Deloitte
America/Toronto
------------------------------

ManasJena
Level 6
Hi Harshil,

Was curious what is the need to maintain environment variables separately like this. You can have a deployment guide which will list this for a process. Also pulling this one time from DB is fine if you want to compare this in various environments.

------------------------------
Manas Jena
Sr Analyst
ZimmerBiomet
America/New_York
------------------------------

The purpose is for documentation for individual process. We work on different processes and different clients. So we don't need everything to be extracted, but we do provide list of variables, objects, processes, etc. in solution design document(sdd), so next person in future can refer to it. How will the deployment guide pick all env.variables on its own, that I am using? I believe I would have to provide list of them manually and typing each and every Env variable is not an idle idea. A simple extract can make the job easier, where I can simply extract and copy/paste in deployment guide/Release document (SDD in our case). Hope this makes sense 🙂

------------------------------
Harshil Mehta
Solution Designer
Deloitte
------------------------------

I see what you are saying. The issue is with current methodology followed. By maintaining Deployment guide I didn't say it will automatically pull environment variable details for you.

I think the good approach would be to maintain a separate document. Will will be Operations and Support. That can have a section say "Process Implementation Plan"  .
This can have before during and post Implementation details.

SDD is more about high level solution details . Many organizations restrict direct DB access for consultants working on RPA projects.


------------------------------
Manas Jena
Sr Analyst
ZimmerBiomet
America/New_York
------------------------------

johny.jain
Level 3
​In Blue Prism portal, you can find a utility process called Release Map. The input to this process is your process release file which consists of process, objects, environment variables etc. Once you run the process it creates an excel output which lists all processes, all objects including the actions that are being called from each object and also the list of all environment variables that were part of the release. Its easy to copy from this output excel file for the documentation purpose.

------------------------------
Johny Jain
IT Solution Engineer
Kimberly Clark
Asia/Kolkata
------------------------------


Hi,

do not know about the Release Map - might be a very good solution. Will check for myself.

if only Env Variables are in question - there is another way using simple powershell script from release file if that is working for you

1. you need to have a release file with required env variables
2. save the code below to GetEnvVarsFromBPRelease.ps1
3. edit $BPReleaseFile, $BPEnvVarsFile variables, change csv delimiter as you please
4. run the script on it to get CSV (might be redone to other outputs easily):

code between ###:
#############################################################
# change input bprelease path and filename and output file
$BPReleaseFile = "c:\temp\env.bprelease"
$BPEnvVarsFile = "c:\temp\BP_ENV_var.csv"

[xml]$xml_doc = Get-Content $BPReleaseFile -Encoding utf8
$xml_doc.release.contents.'environment-variable' | Select-Object -Property "Name","Type","Value" | ConvertTo-Csv -Delimiter ";" | Out-File $BPEnvVarsFile -Encoding utf8
#############################################################
​​​​

------------------------------
Mindaugas Breskus
Software engineer
Swedbank
Europe/Vilnius
------------------------------

This would be helpful. But I don't think there is any such Release mapper VBO provided by Blue Prism. This sounds like some custom made object. Could you please share more details on this? Links, navigation steps, etc. 

Thanks,

------------------------------
Harshil Mehta
Solution Designer
Deloitte
------------------------------