Replies: 1 comment
-
To achieve the scenario where you want to allow end users to plug in custom activities without having to redeploy your application, you can create custom activities as separate class library projects (DLLs) and then load them dynamically at runtime. Here's a general approach to achieve this:
Here's a simplified example of how you might load and register a custom activity from a DLL: var assembly = Assembly.LoadFrom("path-to-custom-activity-dll");
var types = assembly.GetTypes().Where(type => typeof(IActivity).IsAssignableFrom(type));
foreach (var type in types)
{
services.AddActivity(type);
} Please note that this is a simplified example and the actual implementation may vary based on your specific requirements and the version of Elsa you are using. For more detailed guidance and best practices, you should refer to the Elsa documentation and community resources. If you need further assistance, you might consider reaching out to the Elsa community or seeking professional consultation. |
Beta Was this translation helpful? Give feedback.
-
I am building a workflow application with Elsa. End user can create their workflows from the Elsa dashboard or writing JSON and then import.
I would like to do the same for activities where activities can be plugged. Let me explain the scenario.
Suppose I am building a custom activity to fetch details from SAP. Now I do not want to release my application again.
I'll create the activity DLL or write the activity in JSON, I don't know what is possible. Then provide this file to the end user for import.
If none of this make sense 😀, please give me some guidance how can this be achieved.
Beta Was this translation helpful? Give feedback.
All reactions