Does GetRobotAsset-Activity really works as provisioned in REFramework course Solution Architect V2021.10?

Background; Academy offers to download a working (live realistic?) sample for learning on REFramework. Despite the fact this sample seems outdated and is not complete (doc’s, app and proper instructions on particular parts is missing) I’m trying to get it up-and-running, simple to learn from it!

However, I’m stucked on one particular spot: fetching Orchestrator assets! Does it really accept only a ‘Hard coded’ string to map an item as offered on the select list? I can’t image this is true!

The latest version of this activity ‘GetRobotAsset’ offers to store the Orchestrator Folder Path (optional) which means the path to the folder containing the ‘Assets’ in the cloud. These Assets are KeyValue-pairs in which the values are actually strings (except the Credential), so far so good!

Next the troublesome part!

Asset Name [REQUIERED] - It is NOT possible to store a variable into it. As suggested in the same code. It is suggested to use a variable which holds the key (Name) fetched from the config file.
However, this box accepts only the clear name.
It seems not to act as a standard inputbox (it is so much more a select box which offers the assets (which also can be seen in the Data Manager) coming from Orchestrator (if the correct environment or Orchestrator Folder has been chosen).

Except that in this REFramework sample; a) ‘Dispatcher’ flow including the data file, and b) the UiDemo app itself aren’t supplied, it is pretty strange that within the ForEach, which means from each row from the config file from sheet ‘Assets’ the field ‘Name’ is picked up as [row(“Asset”).ToString] which actually holds the Name ‘UiDemo_ApplicationPath’ (sample) to be used as a key to match with the asset name from Orchestrator to pickup the related value (in this case should be the url to the app spot, that’s what the name suggests) can NOT be used in the ‘input-select-box’-called Asset Name. This box only accepts a ‘Hard coded’ value which maps with an item on the select list.

‘[row(“Asset”).ToString’’ holds the name ‘UiDemo_ApplicationPath’], it can NOT be used to map ‘UiDemo_ApplicationPath’ which is offered as a selectable item. More or less analog to the switch activity in which also no variable can be used only a ‘hard coded’ string.

Is this really true, it is designed like this? It means, to fetch a corresponding value from Orchestrator within the TryCatch in the ForEach looping thru a list of ‘Names’ fetched from the Asset-sheet (config file), it needs a much more complex construction with a Switch- or If-filter with hard-coded strings to fetch the proper asset-value.

It is difficult to imagine this is the way this sample works now-a-days, It seems that the comparable activity in the legacy project does a better job! Hopefully I’m not correct!

Screenshots are pretty well self explaining

  1. Situation
  2. Problem

It’s not so clear, but the activity is in “Autocomplete mode” and in this configuration, it won’t accept variables. If you click on the plus sign and then “Open in Advanced Editor” or “Use Variable”, it will work like you’d expect.
image

AsSuggestedButWrong

@efelantti, there is no option to enter a variable!

Also the documentation does not give a clue entering a variable, see https://docs.uipath.com/activities/other/latest/workflow/get-robot-asset

In previous versions (legacy) is seems to be possible, but not in the latest version!

Just in case, I didn’t mean the advanced options, but the advanced editor which you can open by clicking the small plus sign on the rightof the asset name field. When you open the advanced editor, you should be able to provide an expression / variable.

@efelantti
Thanks, now finally, as you suggested, open the advantage editor, select a predefined variable, in which the row(“Name”).ToString is loaded. Save it, debug, and finally the robot passes this activity.

As said (why should I bother others in the first place) for several days, I got stucked on this barrier, every previous occassion running into problem

Moreover, believe me, I have used/tried a variable before, but nor via or nor opening the advantage editor; no, I stored it right away in the required input-selectbox (as everybody should normally do). We aren’t trained to take this long road of clicks, oh well :roll_eyes: !

Being a bit pedantic, instead of using a predefined variable, I tried the ‘row(“Name”).ToString’ instruction as well. I am :astonished:, it works!

The moral of the story; in every occassion if something doesn’t work, click on every possible button, link or anything else being able to select a predefined variable and pray if it works!

The :woozy_face: thing is, if I now try to see the select-list of assets again, as can be seen in presented screenshots, it’s not possible anymore. Somehow the ‘overall’-character of this GetRobotAsset-activity has changed to a lower level of intelligence!

1 Like

Good that it’s solved for you. I agree that it’s easy to miss and hope there will be a change so it would be more intuitive.

You should be able to reset the functionality by clicking again on the small plus sign and choosing “Reset to autocomplete” (or something like that, not able to open Studio right now).

:face_with_diagonal_mouth: !

There isn’t an option to ‘Reset to Autocomplete’ or something what might look like to get back to the more sophisticated level!

UiPath was, is and will be a product ‘in development’ ! That’s the :melting_face: part, to keep playing with it!

There is another thing to ‘mark’ on this particular activity ‘GetRobotAsset’.

In, what is mentioned, it might offer a more sophisticated level called ‘Autocomplete’-mode - this activity, when it fetches assets from Orchestrator (which can be tracked in de Data Manager-pane also), it should be able to discriminate between datatypes; Text, Bool, Integer or Credential. Apparently it does, however…

Assets in Orchestrator are typed with one of the datatypes; Text, Bool, Integer or Credential. I guess, in the ‘Autocomplete’-mode, it only fetches assets datatyped ‘Text’ or apparently the ones typed with ‘Bool’ and ‘Integer’ too. If not able to reset to the ‘Autocomplete’-mode, it can’t be checked, whereas assets with all of the datatypes, created on Orchestrator, do popup in the Data Manager.

At this level, for myself, I can’t see the ‘added value’ of ‘Autocomplete’-mode (to me it generates only trouble). As ‘UiPath Academy’ proposed with this almost to ‘real live’ sample on REFramework in the Solution Architect learning path, it is quite conceivable to fetch an asset with datatype Credential too (within this sample, it is needed to login into UiDemo with the credential stored in Orchestrator).

Luckily, UiPath offers another activity which need to be implemented; the ‘GetCredential’-activity. This means, within the ForEach, for each ‘row(“Name”).ToString’ in the Try-block, the Do-sequence, still needs a filter; in this case on the type of datatype ‘Credential’. Therefore, a filter like an If-(or a Switch)-activity matching the asset name containing a substring ‘*redential’ seems to be essential. I’m not sure that the correct way to follow, can be wrong, though!

Anyway, hooray for :uipath: !

Implementing the ‘GetCredentialAsset’-activity as well, giving me the same trouble! This time, I’m aware of the ‘mis’-conception. Drag-and-drop it into the Else-sequence storing the row(“Name”).ToString into the ‘Asset Name’-box. It not a string, yet, but not accepted as a ‘variable’ either !

Clicking the (+)-sign entering the advanced editor, seeing red squigglies and red exclamation, which disapear when clicking the option variable, then the line turns into a string its surrounded with double quotes ? Instead of being a variable (down graded the autocomplete mode) its converted into a string, after closing the advanced editor the line is turned into a string, see

Now, the context menu shows the option: Reset to autocomplete-mode.

However, not clicking this option, but simply removing the double quotes from the string, seems to be the solution to turn the string into a proper coding line back again. Now it is accepted as a ‘variable’, starting to debug, the asset containing the ‘redential’-substring is mapped (this is the way I implemented an If-activity to discriminate between asset types, which I think isn’t certainly the most proper way, oh well), it gives the username (string) and password (securestring) as output.

Well, I learned something !

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