Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] IsSystem property is manditory for Definitions and Instances #5366

Closed
Nekrosis1 opened this issue May 10, 2024 · 1 comment · Fixed by #5462
Closed

[BUG] IsSystem property is manditory for Definitions and Instances #5366

Nekrosis1 opened this issue May 10, 2024 · 1 comment · Fixed by #5462
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Nekrosis1
Copy link

Description

When Requesting A List of Workflow Definitions or Workflow Instances, Workflows which don't have the property "IsSystem" set at all do not show up.

Steps to Reproduce

Remove IsSystem property from a Definition or Instance on the DB, try to load the list eg. with Elsa Studio.
This naturally happens when updating Elsa from <3.1.0 to >= 3.1.3 since the property was newly introduced.

  1. Code Snippets: If the issue involves code (e.g., JavaScript error, server request failure), include the relevant snippets where the issue occurs.

  2. Reproduction Rate: 100%

  3. Video/Screenshots: Sometimes, complex behaviors are better shown than described. If you think a video or screenshots would help clarify the issue, please include them.

Expected Behavior

Definitions and Instances should be displayed if either IsSystem = false or IsSystem is not set.

Actual Behavior

Definitions and Instances only get displayed if IsSystem = false

Environment

  • Elsa Package Version: Elsa Core 3.1.3 and Elsa Studio 3.1.0
  • Operating System: Win10
  • Persistent Storage: MongoDB

Log Output

Include any relevant log output or error messages that might help diagnose the issue.

Troubleshooting Attempts

Add "IsSystem = false" to every entity is a workaround.

@Nekrosis1 Nekrosis1 added the bug Something isn't working label May 10, 2024
Copy link

glime-ai bot commented May 10, 2024

To address the issue where workflow definitions or instances without the "IsSystem" property set are not showing up in Elsa Studio, you should ensure that the property is explicitly set to false for all existing definitions and instances in the database. This is necessary because the behavior has changed with the introduction of the "IsSystem" property in Elsa version 3.1.0 and later.

Since the property was newly introduced, entities that were created before the update may not have this property set, leading to them being filtered out when Elsa Studio tries to list them. By setting "IsSystem" to false, you ensure that these entities are included in the list.

If you have direct access to the database, you can run an update query to set the "IsSystem" property to false for all records where it is not set. If you are using MongoDB as your persistent storage, the query would look something like this:

db.workflowDefinitions.updateMany(
  { "IsSystem": { "$exists": false } },
  { "$set": { "IsSystem": false } }
);

db.workflowInstances.updateMany(
  { "IsSystem": { "$exists": false } },
  { "$set": { "IsSystem": false } }
);

Please replace workflowDefinitions and workflowInstances with the actual collection names in your MongoDB database.

Remember to back up your database before running any update queries to prevent data loss.

If you are not comfortable running database queries or do not have direct access to the database, you may need to contact the Elsa support team or the community for assistance on how to best apply this change to your environment.

This comment was generated by Glime.

@sfmskywalker sfmskywalker moved this to Todo in ELSA 3 May 10, 2024
@sfmskywalker sfmskywalker added this to the Elsa 3.2 milestone May 10, 2024
@sfmskywalker sfmskywalker moved this from Todo to In Progress in ELSA 3 May 28, 2024
@sfmskywalker sfmskywalker self-assigned this May 28, 2024
@sfmskywalker sfmskywalker moved this from In Progress to In Review in ELSA 3 May 28, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in ELSA 3 May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants