Hey, wondering if there’s some more thorough documentation around the functionalities supported for Creating a Custom Activity (SDK - Creating activities with code).
Specifically I’m concerned with creating more complex designers, but I’ve noticed several general inaccuracies/gaps in the Activities API documentation.
At a high level, what I’m trying to do is to make managing configurations easier and less prone to error. To achieve this I’m implementing a few things:
-
A wizard that opens a window that can be used to edit and configure Settings, Assets, and Resources (files).
-
This window has a function to ‘Generate Config Classes’, which generates a C# class for each configuration that is set up.
-
The window also has a ‘Save Configurations’ function to output the full metadata of the configuration into a json.
-
The last step is to implement a LoadConfig activity. The core activity should take a path, and a name or type, and dynamically return the appropriate class depending on what path and name are used. I would additionally like the name property to be a dropdown based on the value for path selected. Ie. User selects a path → this updates the available names based on the names of the configurations in the JSON → this updates the output type to the appripriate Config Class.
I know that this sort of functionality is definitely possible since many of UiPath’s activities use it. Specifically, UiPath.DocumentUnderstanding.Activities’ Extract Document Data activity has essentially the same functionality required: User selects a project → this updates the available extraction models → this updates the output type.
My intuition tells me that I need to probably create a custom service or something for that particular activity, or maybe create an activity factory? But there’s no documentation available for any of that. Additionally, I can’t infer from decompilation in Visual Studio what IDesignServices (in the constructor of the viewmodel) contains, or how UiPath studio reflects which types to what views/viewmodels in the designer.
Other than just trial and error, I don’t know how to figure this out.
My fallback would probably be just to create another function in the wizard called ‘Generate Load Xamls’ which dynamically generates xamls that load each configuration?
Appreciate any feedback!