Create configuration file in Studiox

Hi there,

Would really appreciate your answer for the below:

A. How do I create a config file for my project in Studiox?
B. The project is made to run on local machine. How do i go about making it dynamic whereby any authorized person can run it seamlessly?

Did complete my RPA Citizen Developer training and couldn’t find anything that covers the above. Any help on this is appreciated! Thanks in advance :slight_smile:

Hi @Chinmaya_Dhal

Congrats on completing your RPA Citizen Developer training!

In response to your queries, in a nutshell:

  1. The config file is a Excel file that you can create and change some settings within your UiPath StudioX project without using Studio-X.
    1.1 For example, specifying where to read the source data, where to store the results or output of robot, etc.
  2. Access the config file is same as accessing the Excel within StudioX
    2.1 It should contain two columns name and value
    2.2 The name column for example is InputFolder, value column for example is C:\users\abc.xlsx

So you can effect a small change via the config file without needing to open StudioX. This is especially useful for local machine with RPA robot only.

  1. After you have finished building and testing your RPA project, published it.
    3.1 The output of publishing is to create a package file extension *.nupkg which is your published/zipped RPA bot script.
    3.2 The RPA robot assistant will display the published RPA bot script - any authorized person login on local machine can run it.

Hello,

I would like to bring to mind the following issue: the project notebook excel file or all other files that reside in project folder is packaged along with the xaml files when the nupkg package is created. This implies that when you share your project it can be quite a hassle to go into the robot’s belly and reconfigure your workflow in order to workout all the bugs and glitches that come along once you distribute your automation inside your team :slight_smile:

As a possible fix to this kind of situations I see 2 solutions :

  • You leverage the smart path capabilities and you have the configuration file in a location that is outside the project folder. For example something like

Which translates into something like this :
<[Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)]>\Downloads\BtSsm_20190929_161919_knock.xlsx and as you can notice Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) function is used which will return the user folder of the user which is running the workflow.

  • Another more elegant approach would be to lever the integration between StudioX and Orchestrator and just have you configuration file stored in Orchestrator as assets and then just use the get orchestrator asset activity to retrieve the values from orchestrator. I know this sounds counterintuitive since one has to use another app to organize and distribute the configuration file, but there are several advantages to using orchestrator for this kind of approach

    1. One can define the same configuration file for a group of users by leveraging the folders capability ( all users belong to the same folder in orchestrator thus having access to the same configuration ) this in my opinion works best for workflows that are designed to cope with a certain task that is shared across a team

    2. One also avoids all the security issues that arise from sharing plain text passwords :smiley: by using the orchestrator credential storage system

Hope this helps,
Dragos.

1 Like

Hi @GreenTea

Thanks for your suggestions. I will try incorporating this and see if this works for me. Would come back with further questions. Thanks a lot again :slight_smile:

Hi @ Dragos,

Thanks for your reply. I would try to incorporate your suggestions. Do you have any good read or any audio/video resource for me to refer before I try that out? Appreciate your recommendations…:slight_smile: Thanks again!

Hi there @GreenTea @dragos.suma @Parth_Doshi @balupad14 need your help on this.

All the activities of my project takes place within a desktop folder. I am moving 4 downloaded Excel files to the desktop folder. I am doing all kinds of sorting within the files while they are inside the desktop folder.

I’m able to create desktop folder via config file. Do I need to also create the files dynamic. If yes, how do I do that in studiox?? FYI - I have hard coded the entire project. Please help.

Hi @Chinmaya_Dhal

What do you meant by files dynamic ?

In general, your folders structure should reflect your requirements for storage and retrieval.

Hi @GreenTea I want my code to be shareable.

Hi @Chinmaya_Dhal

As @dragos.suma mentioned, you can use the idea have the configuration file in a location that is outside the project folder."

1 Like

Hi @GreenTea Thanks for your reply on a Sunday. I amnt sure if I understood your point clearly but here is what I have done.

I have used Excel activity(read config value) and have used ‘if folder exists’ else ‘create folder in user desktop’ and I have used read cell activity that will read the folder path from actual config file which is inside the project folder. This takes care of the folder creation and I think this will work on any system if it is run. But my question is I need to download four different Excel files from four different queues within the application that I use. After download completes, I use file name/full path and then move that file to user/desktop/folder and save it as filename. xls. This is the file I am repeatedly using. Along with that, I have the final report that I prepare. How do I use these files without hardcoding their path?? Do I need to update these file paths within config file, if yes, how do I do that??

Appreciate your help so much :slightly_smiling_face:

@GreenTea @dragos.suma thank you!

@dragos.suma Thank you!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.