elsa-workflows / elsa-workflows/elsa-studio

Prevent Manual Specification of "Default" Case in FlowSwitch and Switch Activities

Open
#156 0 comments 0 reactions 0 assignees View on GitHub
enhancement triaged
Dominant language
C#
Stars
301
Forks
181
Avg merge
17h 12m
Merged PRs (30d)
42

Description

Currently, when using the FlowSwitch and Switch activities in Elsa Workflows, users can specify a case label named "Default." This label is intended for use when none of the user-defined cases match the condition, automatically triggering the "Default" outcome. However, allowing users to manually specify a "Default" case can lead to confusion. Users might assign a specific condition to the "Default" case, expecting it to execute only when that condition is true. This misunderstanding undermines the intended functionality, as the "Default" case is designed to execute when no other cases match.

To clarify usage and prevent confusion, we should restrict users from manually specifying a case labeled "Default." This change will ensure the "Default" case retains its intended purpose as a fallback mechanism, executing only when no other defined cases apply.

Suggested Solution:
- Implement validation in the UI and backend to prevent the addition of a "Default" case by the user in both FlowSwitch and Switch activities.
- Update documentation and user guides to reflect this restriction and clarify the intended behavior of the "Default" case.

Contributor guide

Open the contributing guide

Research direction

Locate the FlowSwitch and Switch case-creation and validation entry points in the UI and backend, then review the existing documentation or user guides for Default behavior. Confirm that users cannot add a case labeled "Default" in either activity, that the fallback behavior remains available, and that the restriction is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
documentation, full-stack
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.