Create your first automation in just a few minutes.Try Studio Web →
by Stefan Krsmanovic
0
Activity
355
Summary
Summary
Custom activity which allows developers to easily integrate classes and interfaces into UiPath, simply by writing plain text source files (.cs or .vb).
Overview
Overview
When you design and develop enterprise level automations with UiPath it is extremely important to write a clean, maintainable code. For that developers have to write large number of workflows, each having a single responsibility.
But this comes at a price. Developers need to choose how they will pass the data between workflows, and there are only two options to choose from:
1. Make many input arguments
2. Pass a single input argument of Dictionary type
Both of these options have flaws.
· First option is better from Single Responsibility Principle and Testing standpoint, but wastes a huge amount of developer’s time, and makes development such a tedious process. Especially when pressure on the project is high, it usually makes developers stop caring about clean code. Workflows become big and they perform many things.
· Second option makes development faster by passing only a few arguments, but makes writing tests tedious. More importantly, it is very easy to make a typing mistake when calling specific values by string keys, which again increases debugging time. And worst of all, requires good planning for bigger development teams (Dev A that defines the dictionary needs to let Dev B know about the key names).
Now, what if we could have best of both worlds?
The solution to this problem is good old POCOs (plain old CLR objects) -> .NET classes that carry plain data.
Wouldn’t it be great if we could define class models in C# or VB.NET and just integrate these new classes into an UiPath project, and get all the goodies that come with intellisense (no more typos with Dictionaries, JObjects, XmlElements)?
Also, don’t you hate when working with REST API that you have to parse that huge JSON response into smaller variables or a dictionary or in the worst case pass that huge JObject around?
Not only this, wouldn’t it be great if we could define interfaces, and leverage all the OOP (Object Oriented Programming) concepts to make better, cleaner and maintainable code?
GenerateModelsFromSourceFiles custom activity enables you to do just that.
Features
Features
· Write source C# or VB.NET files that compile into a single assembly and are automatically built into NuGet package. · Choose where to save the package, or use one of two automatic save options. · Add external assemblies that are needed by the source files you are writing.
Additional Information
Additional Information
Dependencies
Microsoft.CodeDom.Providers.DotNetCompilerPlatform Microsoft.Web.Xdt NuGet.Core
Code Language
Visual Basic
Runtime
Windows Legacy (.Net Framework 4.6.1)
License & Privacy
MIT
Privacy Terms
Technical
Version
1.0.0Updated
July 2, 2020Works with
Studio: 20.4 - 22.10
Certification
Silver Certified
Support
UiPath Community Support
Resources