Hi,
We are using the configuration component available in the robotics to have some environment config parameters, but if we want to change the values for these params we have to modify and redeploy the solution. Is there a way for the user to change the value in the configuration files which the bot can use at runtime to read the updated values without actually making any code changes and solution deployment.
Please provide suggestions for this case.
Thank you,
Anuroop
@AnuroopSamratS16978510 If you want to have settings that a user can modify on their own, I suggest using the Credential Store Component. At the most basic level, this component stores data in a local file available only to that user (and on that machine only unless they have roaming profiles). This is designed for credentials (and is of course encrypted) but can really store anything short enough to fit. I believe you have only a few hundred characters or so that can fit into each field. I have used this many times for this purpose. Of course you could also create your own file, but you have to think about several other things to make it bulletproof.
Here is a simple automation I created to store the location of the UI.
@ThomasSasnettI just realized one caveat to this solution is that the user would need to modify this from within the solution. If you wanted something they can edit without Pega Robotics running, then you would need to create your own file of some sort and create the code to read and write to it. Depending on what settings you wish to store and edit, it might make more sense to do this from within the project and present a UI you create to edit these values.
If you do need to create your own file though, there are several items in the Toolbox that can help with that.
@ThomasSasnett Can we store multiple values in the same ASO.db file with different application keys. I have tried doing that, but it seems not working.
And also, please suggest if below solution works.
can we have a form created for user where they can enter the values and from the solution, we can create a file with the details provided.
But can showing the form to user is controlled based on some conditions?
@AnuroopSamratS16978510 There will be only one ASO.db file for a given user. You can store as many different “Credentials” in it as you like. Each must have a unique name though. For example, in the screenshot I posted, I am using the name UI_Location. I would append that with the name of the project as shown below. This will make it unique unless you run two versions of the same project and need different values for each. You can use any strategy you like to store them uniquely though.
If your solution is not working, please share some screenshots of what you have tried and what you are seeing as results.
You can certainly create your own UI for the user to edit and retrieve these values. You can control if the UI is shown to the user by disabling the ShowOnStartup property. Whenever you want to show it to the user (based on whatever conditions you have coded for), you may use the Show method to display the UI.