elsa-workflows / elsa-workflows/elsa-core

Elsa 3.0 Proposed Enhancements and Learnings

Open
#4,553 0 comments 0 reactions 0 assignees View on GitHub
elsa 3 enhancement tech debt triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

In our journey with Elsa, we've identified several areas of improvement that can make the system more robust, modular, and developer-friendly. Here's a breakdown of our findings and proposed actions:

### 1. Refinement of Activity JSON Format

**Issue**
The current intertwining of activity input properties with other metadata complicates UI implementation.

**Proposal**
- Introduce distinct `inputs` and `outputs` fields in the JSON schema to clearly segregate activity-related properties.

### 2. Streamlining Polymorphic & Activity Serialization

**Issue**
We're using a complex custom JSON converter for the deserialization of `IActivity` and `object` instances.

**Proposal**
- Consider leveraging .NET 7 or the upcoming .NET 8 features to employ custom contract resolvers. This can optimize the built-in polymorphic serialization and deserialization processes.

### 3. Abstraction of JSON Serialization Mechanism

**Issue**
Some services expose their JSON serializer settings, which negates the intent behind abstracting serialization.

**Proposal**
- Ensure encapsulation by hiding JSON serializer settings and emphasizing a more generic serialization interface.

### 4. Overhaul of the REST API Design

**Issue**
The current REST API grew organically, resulting in inconsistent API signatures.

**Proposal**
- Initiate a comprehensive review of the current API endpoints.
- Redesign the API with a structured approach, focusing on consistency and predictability.

### 5. Evaluation of gRPC API Implementation

**Issue**
The limitations and issues in the current REST API design might find solutions in a different approach.

**Proposal**
- Investigate the feasibility and advantages of adopting an RPC style with gRPC. This might be especially beneficial for operation-driven endpoints.

### 6. Decoupling Elsa.Workflows.Api

**Issue**
The `Elsa.Workflows.Api` module tightly couples multiple modules, which goes against the modular philosophy.

**Proposal**
- Allow individual features to expose their functionality as API endpoints autonomously.
- Refactor `Elsa.Workflows.Api` to ensure true modularity in the system.

---

We welcome feedback and additional insights into these proposed enhancements.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.