#FeatureBlog - 18.3 - Library (Reusable components)

Hi @ClaytonM thanks for helping out quickly. You are right. Actually I renamed my sequence (custom activity) in the new update which caused this issue. Now I understood this. Thanks again.

3 Likes

@saravana_689 in order for us to identify what’s happening with your project, can you please follow the following steps and give us the logs?

  1. in the project that give you that error delete .local folder
  2. reopen the project
  3. in UiPath installation folder, please check the latest Studio logs
2 Likes

Hi @ovi,

Hope You are doing well.

I had tried the same scenario to create a custom library and published that custom library.
And install a custom library NuGet package in the process. After that published process.
Published process NuGet package execute on a different machine through the robot.

It throws an error like, image

Is there any solution regarding an error?

Thanks.

2 Likes

Question still on the library.
I have a workflow which I want to implement as a library object.
The workflow as a set of input arguments some are string but few are bit.
It is possible to have a checkbox when input arguments are bit?

Hi andreiT and badita,

regarding last sentence of ClaytonM:
My concern is that if we have several projects, it will require an entire day of going through and republishing everything just after a simple update to a Library.
We currently use a shared folder for our common codes and we use “invoke workflow file” to use them - which seems very useful for us.
When a “component” needs an update (e.g. login to SAP) and the modification is backwards compatible, we simply change the code in the shared folder, and projects that use them will simply use the latest version without and other thing to do - which is very good.
But invoking these workflows needs to use a global asset called “Common Workflow Path” that specifies the rootfolder of common codes and “Invoke Workflow” activity’s textbox is occupied by the path instead of the workflowname and does not show up arguments only if we click the appropriate button.
We plan to change these codes (most of them is a simple xaml) to libraries and publish them to orchestrator. Then can we simply drag the needed one from the activities panel and we can simply set the parameters in the properties window. This is OK, but forceing the host process to use the latest version is not that easy. The only way is as you mentioned, we should delete the old nupkg file from all of our robots and then “lowest applicable vesrion” will work. But this overwork (rdp on all machines, delete the old nupkg file) does not compensate the benefit of using libraries instead of invoking common workflows. I wonder when “use highest applicable version” or similar solution will be implemented.

Thanks,
Ernő

Yeah, that’s how we have done it, but the version management is not great. We check-in our code updates to Azure DevOps, but there’s no way to direct the invoke to that location since it’s on the cloud (maybe there’s a way which I’m not aware of).

So, let’s say one person updates a workflow and checks it in. Then, another person updates it. Now, they must download the latest version to another location (this is because DevOps locks the project location to the first person and machine). This makes it hard to maintain the real latest version since it’s actually located on the DevOps server rather than in your centralized network location.

That’s probably the way to go. This allows you to use the same version management tool which you use to deploy workflow projects to various Orchestrator environments. But, yeah, it’s always a challenge trying to make this migration if you are like me and have several projects out that are utilizing so many re-usable pieces, and convincing the business leadership that time is needed toward these changes - almost need to work like a superhuman to deploy the new processes in the pipeline and sneak in changes to Library deployment in between :laughing:

You can make the deletes straight in Orchestrator, however I think in 18.4 only the admin has the ability (yikes). Basically, when you know you have a stable version, just delete previous versions. However, this could also cause issues potentially since if you have a process that likes a certain version, you would not be able to use older versions on some processes. (so the update could not be so much that it impacts older processes). But, I’d say many re-usable Libraries, you would want the update to impact all processes, because for example if SAP goes to a version that impacts how your Library for SAP performs, your update would need to deploy to all processes that use it. For 10 processes, it’s not a big deal; just open it and update the version, redeploy, and (hopefully) approvals on it doesn’t take long, which it might. For 100 processes, this could take a while…

Regards!

2 Likes

Hey ClaytonM, thanks for your time and update. The problem for me that if I delete previous versions from orcehstrator (with host admin) then the process still uses the old version that exists on the .nuget folder on the robot machine’s users folder. The old package file also needs to be deleted in order to get the new one when we start the process.

So if only a small orchestrator update would be needed then it would be great but it seems that the file needs to be deleted too. Or did I missed something?

Thanks too
Good luck …

How to pass data value / variable / arguments to library in a workflow

What I am doing
I am building multiple projects based on amazon. So I have created a library of activities which frequently used in all projects.

What I want to do
I want to pass some data value (variable/arguments or in any format) from workflow to the library. So it can execute activities based on given data values.

For example :-
I am building project for amazon sellers. so in all project “login to the amazon” is a common activites. I have build library of activites which login into amazon.

Now I want to pass “email & password” from main workflow to library. So it can login using given data.

@badita @loginerror @ovi

1 Like

Hi @Tech_Guru

This is part of how libraries work. Arguments in a library will show as properties when the library is published and used in other projects.

I cant see an option to set property for library. Could you please share screenshots where its exist

When you are creating your library, you create an In or Out Arguments, just like you would when developing a Process and it will be provided as a property of the activity.

The second reply in the conversation provide an image of what you are looking for.

2 Likes

Hi @andreiT,

I have gone through following documentation Managing Dependencies
It explains about the dependency issues that will popup for different package versions in project and in Library.

I am curious to understand, what is the best practice to avoid this during design phase ? Meaning like, should I use either strict or Lowest applicable version consistently use it across the library and in project ?

Also, will there be any feature in Orchestrator which can share the library version and runtime is used (strict or Lowest applicable version) by the processes ?

Can we have an alter feature, if someone is going to delete a particular version in Libraries which is reference by any of the process.

Thank You
VJ

Hello,
Best practice is to create a process with dependencies having strict version. This way, you will be sure that the process you created and tested with certain versions of dependencies will always work (as they will always run with that version <this applies for processes created with 18.3 + >).

As far as I know, there are some improvements to dependencies in the design phase right now, but I’m not exactly sure what they are or when will they come.
I know that Studio has a lot of these, like full dependency rules (additional rules, beside strict and lowest applicable version : Highest, Highest Minor and Highest Patch).
Unfortunately, I don’t know what to tell you about libraries in Orchestrator, it is usually a bad idea to delete them from your Orchestrator feed. Maybe having your own (tenant) library feed might help?
For Orchestrator to actually check if a version of library is used in a process might be very costly (t would need to check all packages for that version). I’m not saying it cannot be done, but I think a smart implementation should be done as it could be very taxing on resources.
From my knowledge, no such functionality is being worked on right now, but feel free to add this to any Orchestrator feedback posts on this forum.

Hope this helps,
-Andrei

2 Likes

Hi ovi,

I am exploring this feature currently in 19.4 version. I have created a simple library and published it in local folder (custom option) with version 1.0.1.

I have created another project to use the library and test it. I could successfully test it and everything is working fine.

Now, I made few changes to the library, deleted the old version from publish location (local drive) and published the new version with same version number 1.0.1

In the test project, I have uninstalled the old library and saved the changes. Now, I am adding the same library to the test project and testing it.

Here I am facing a challenge that the old library activities / functions still there and not updated with new functionalities…

What is the issue here ?

Thank You
VJ

Hi @vijayakumarkj

Could you provide an example of which parts of your library do not get updated?

Hi @loginerror,

I followed below steps,

  1. Create a library project. Add a component (xaml file). Added few activities here.
  2. Publish the library to local drive and it is versioned 1.0.1
  3. Create another project (process)
  4. Add a component
  5. Goto Manage packages and add the custom library version 1.0.1
  6. Add the activity from custom library and run the process, it works fine

Now, I will change the library

  1. Open the same library project. Open the component, make few changes
  2. Go to the local drive, delete the library version 1.0.1 (nupkg package)
  3. Publish the library to local drive with same version 1.0.1
  4. Next, Open the same project
  5. Go to manage packages, uninstall custom library version 1.0.1 and save
  6. In Manage packages, search for same custom library version 1.0.1, install and save again
  7. Run the process, it works with previous version of the library !!! → Expecting it to work with new library
  8. Otherwise, delete the activity in process and add the same activity in the project again
  9. Run it, it works with previous version of the library !!! → Expecting it to work with new library

Work around is, publish the library in new version 1.0.2

I followed the steps to add it in the project and ran it. It runs with new updated library.

Not sure of the reason why the library was not refreshed in local drive, even though it was deleted and republished from Studio.

Thank you
VJ

Hi @vijayakumarkj

Is there a reason you insist on uninstalling the previous library? Normally, when you republish a library with a newer version, it will display you an option to update the dependency in the Package Manager.

Therefore, I wouldn’t call it a workaround, but rather an intended behaviour.

2 Likes

Hi @loginerror

Thank you for the explanation. I understand how the of library & version works!

Thank you
VJ

Please provide suggestion