#BetaFollow-up - Library (Reusable components)

betafollowup

#42

My bad. For 2 I skipped the “in library” part.

I guess the thinking is that the libraries are “highly” redistributable pieces that should not have pointers to folder paths but probably there may be needed. I was curios if this can’t be done inside an Invoke Code activity.


#43

What do You mean by inside an Invoke Code activity? Is it possible to invoke workflow from code activity?

My original goal was to call Library from Project X so that based on input parameter Library would then call xaml file from Project content. But it might not be possible if Project and Library are executed in different contents? I assume I can provide absolute path to Library so that actual workflow from Project content could be executed but the environment would be different so that relative paths and Package manager content would not be same -. or is that correct assumption?


#44

Invoke Workflow isn’t possible from Invoke Code.

Library can itself be located in your choice of folder location and your dependencies file should be modified to point to that location for the library if you chose not to use Orchestrator.

However it is not possible to give dynamic expressions as argument when invoking a workflow file in a library.

In .Net words, UIPath library is a compiled dll and can not contain code that will need to resolve invoking workflows through reflection. If you want to load dynamic workflows based on input arguments, you will have to build a factory model where in you will have to write IF/ Switch Case.

If (arg1 == “A”) { Invoke Workflow A}
If (arg1 == “B”) { Invoke Workflow B}


#45

Hello,

I am quite naïve in this technology. So could someone please help me with below doubts on this topic?

  1. Can I publish the library to the Orchestrator? If yes, then where will it be visible?
    The problem is that currently when I try to publish a library, the Orchestrator Option is deactivated, (I am using the community version) so I assume libraries cannot be published to Orchestrator.

  2. Can someone else use the library published by me? If yes, then how?
    Do we need to maintain a common location for the access?

Thanks for your time!


#47

how to add icon to my library in uipath 2018.3.2


#48

Hi @venkat4u

It is considered for the following releases. Stay tuned :slight_smile:


#49

@loginerror

thats awesome…

may i check another one, is there any way i can add checkbox/drop down
in Library input arguments?


#50

Hi @venkat4u

Could you clarify whether you mean a set of default values that would be available for particular fields in you Library activity properties?


#51

i mean, in the Write Range acitivity, we have property called, AddHeaders…which is check box.

Regards,
venky


#52

I got you now. I believe this is also on the list already :slight_smile:


#53

wow. this is so cool. looking forward for more such stuff.


#54

If you want to reusable own library. I suggest some good tips to make library good and fresh. You should clean multiple program.you should remove etc thing in a gallery. And you can create in the library.,


#55

Is it possible to add descriptions to the activity properties to appear when you mouse-over the property name (like they do with built-in activities)? It would be super useful to give more detail on what the property is / does to other developers using the activity.

I tried this by adding annotations to the arguments of the workflow before publishing and importing, but the tooltip that pops up still has no description.

image


#56

Hi @Foehl

I don’t know how much it will help, but we have a bunch of open sourced activity packs. They might serve you as an example :slight_smile:



#57

Thanks @loginerror. I’ll take a look. If I manage to figure out how it’s done I’ll post some info on how to create the tooltips.

It would be nicer to have a user-friendly method built into the library creation process though rather than having to edit code.


#58

What a hasty answer I gave, slightly irrelevant :slight_smile: Sorry for that.

More improvements to the libraries are indeed coming in future versions. Stay tuned!


#59

Is it possible to give Check box as an argument?

Trying to create library for SMTP Email activity, and want to know if I can create an argument for “IsBodyHtml” check box in properties panel.


#60

@ys15 I think you need to send an argument as Boolean type. Then, in your library use either an If or Pick Branch activity to execute SMTP with either IsBodyHtml option checked or unchecked (so 2 different Send SMTPs). If you are using Invoke Code to Send SMTP then you can implement that Boolean argument in the code like smtpMsg.IsBodyHtml = boolIsBodyHtml


#61

@ClaytonM Thanks! That helped.


#62

Thanks for this great update. It makes easy to reuse the code instead of using invoke workflows. When using this I noticed that the custom activities used in workflows become unusable if there are any updates to the arguments of the custom activities in the next new version. Is there anyway to manage this with less rework effort? Please suggest

Missing%20or%20invalid%20acitivity