elsa-workflows / elsa-studio

A modular, extensible dashboard application framework
MIT License
187 stars 90 forks source link

[BUG] Copying and pasting an activity with nested activities results in a "duplicate key" error #272

Closed sfmskywalker closed 1 month ago

sfmskywalker commented 3 months ago

When attempting to copy and paste an activity that contains other nested activities, the operation fails and throws a "duplicate key" error. This issue prevents the reuse of complex activity structures within workflows, impacting the ability to efficiently build and modify workflows.

Steps to Reproduce

  1. Create an activity that includes one or more nested activities.
  2. Copy the entire activity.
  3. Attempt to paste the copied activity within the same or a different workflow.

Expected Behavior

The activity and its nested activities should be successfully copied and pasted without errors.

Actual Behavior

The operation fails with a "duplicate key" error.