Multi person collaborative workflow will be lost #5859

Closed
opened 2026-02-21 18:12:54 -05:00 by yindo · 7 comments
Owner

Originally created by @mdxlCJ on GitHub (Sep 29, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.8.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When multiple people collaborate on a DIY workflow, if others view and one person modifies, the person viewing will overwrite the modified content and lose it

✔️ Expected Behavior

When multiple people collaborate on a DIY workflow, if others view and one person modifies, the person viewing will overwrite the modified content and lose it

Actual Behavior

No response

Originally created by @mdxlCJ on GitHub (Sep 29, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.8.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When multiple people collaborate on a DIY workflow, if others view and one person modifies, the person viewing will overwrite the modified content and lose it ### ✔️ Expected Behavior When multiple people collaborate on a DIY workflow, if others view and one person modifies, the person viewing will overwrite the modified content and lose it ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug🌊 feat:workflow labels 2026-02-21 18:12:54 -05:00
yindo closed this issue 2026-02-21 18:12:54 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 29, 2024):

I found a similar issue and discussions related to multi-user collaboration and workflow overwriting in Dify:

  1. Issue: Automatically saving workflows can result in overwriting changes made by others (closed) - This issue discusses the problem of automatic workflow saves overwriting changes made by others. The suggested solution involves implementing version control to manage concurrent edits and prevent overwrites.

  2. Discussion: Automatically saving workflows can result in overwriting changes made by others - This discussion also addresses the same problem and suggests similar solutions.

  3. Discussion: Changes may be lost if an orchestrate page is opened in multiple browsers at the same time - This discussion highlights the issue of changes being lost when the orchestrate page is opened in multiple browsers simultaneously.

To address the issue of workflow overwrites during multi-user collaboration, implementing version control is a practical solution. Here are some steps to integrate version control into your workflow management:

  1. Implement Version Tracking: Incorporate a version tracking system in your workflow data model, such as incrementing a version number or using timestamps/hashes for each change.

  2. Adjust the publishWorkflow Function: Modify this function to create a new version on publish, rather than overwriting the existing workflow. This involves saving the workflow with a new version identifier.

  3. Ensure Editing the Latest Version: Before allowing edits, verify the user is working on the latest version. This may require fetching the latest version from the server and comparing it with the user's version.

  4. Concurrent Edits Handling: Develop a strategy to manage concurrent edits, which could include locking the workflow for a single user or merging changes from multiple users.

  5. Update UI for Version Control: Reflect version control in the UI by disabling editing on older versions, showing version history, and providing options for version comparison or reversion.

Here's a basic example to start implementing these concepts:

const publishWorkflow = async (endpoint: string) => {
  const newVersionData = { ...workflowData, version: getNextVersion() };
  const response = await fetch(endpoint, {
    method: 'POST',
    body: JSON.stringify(newVersionData),
    headers: {
      'Content-Type': 'application/json',
    },
  });
  if (!response.ok) {
    throw new Error('Failed to publish new version');
  }
  return await response.json();
};

const getNextVersion = () => {
  return latestVersion + 1; // Simplified example, assumes tracking of the latest version
};

const checkIfLatestVersion = async () => {
  // Logic to fetch the latest version and compare with the current version
};

This approach ensures that each change creates a new version, preventing overwrites and facilitating clearer version management [1][2][3].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 29, 2024): <!-- Answer --> I found a similar issue and discussions related to multi-user collaboration and workflow overwriting in Dify: 1. **Issue**: [Automatically saving workflows can result in overwriting changes made by others](https://github.com/langgenius/dify/issues/3607) (closed) - This issue discusses the problem of automatic workflow saves overwriting changes made by others. The suggested solution involves implementing version control to manage concurrent edits and prevent overwrites. 2. **Discussion**: [Automatically saving workflows can result in overwriting changes made by others](https://github.com/langgenius/dify/discussions/3610) - This discussion also addresses the same problem and suggests similar solutions. 3. **Discussion**: [Changes may be lost if an orchestrate page is opened in multiple browsers at the same time](https://github.com/langgenius/dify/discussions/4312) - This discussion highlights the issue of changes being lost when the orchestrate page is opened in multiple browsers simultaneously. To address the issue of workflow overwrites during multi-user collaboration, implementing version control is a practical solution. Here are some steps to integrate version control into your workflow management: 1. **Implement Version Tracking**: Incorporate a version tracking system in your workflow data model, such as incrementing a version number or using timestamps/hashes for each change. 2. **Adjust the `publishWorkflow` Function**: Modify this function to create a new version on publish, rather than overwriting the existing workflow. This involves saving the workflow with a new version identifier. 3. **Ensure Editing the Latest Version**: Before allowing edits, verify the user is working on the latest version. This may require fetching the latest version from the server and comparing it with the user's version. 4. **Concurrent Edits Handling**: Develop a strategy to manage concurrent edits, which could include locking the workflow for a single user or merging changes from multiple users. 5. **Update UI for Version Control**: Reflect version control in the UI by disabling editing on older versions, showing version history, and providing options for version comparison or reversion. Here's a basic example to start implementing these concepts: ```tsx const publishWorkflow = async (endpoint: string) => { const newVersionData = { ...workflowData, version: getNextVersion() }; const response = await fetch(endpoint, { method: 'POST', body: JSON.stringify(newVersionData), headers: { 'Content-Type': 'application/json', }, }); if (!response.ok) { throw new Error('Failed to publish new version'); } return await response.json(); }; const getNextVersion = () => { return latestVersion + 1; // Simplified example, assumes tracking of the latest version }; const checkIfLatestVersion = async () => { // Logic to fetch the latest version and compare with the current version }; ``` This approach ensures that each change creates a new version, preventing overwrites and facilitating clearer version management <sup>[[1]](https://github.com/langgenius/dify/issues/3607)</sup><sup>[[2]](https://github.com/langgenius/dify/discussions/3610)</sup><sup>[[3]](https://github.com/langgenius/dify/discussions/4312)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@mdxlCJ commented on GitHub (Sep 29, 2024):

多人协同的时候,其他人查看日志,一人修改,会把修改的内容丢失

@mdxlCJ commented on GitHub (Sep 29, 2024): 多人协同的时候,其他人查看日志,一人修改,会把修改的内容丢失
Author
Owner

@mdxlCJ commented on GitHub (Sep 29, 2024):

或者其他人看工作流的时候,会突然闪一下,导致更新的流程数据丢失

@mdxlCJ commented on GitHub (Sep 29, 2024): 或者其他人看工作流的时候,会突然闪一下,导致更新的流程数据丢失
Author
Owner

@Sakura4036 commented on GitHub (Sep 30, 2024):

It's currently designed to update pages automatically, so don't collaborate with multiple people or use a workflow at the same time.

@Sakura4036 commented on GitHub (Sep 30, 2024): It's currently designed to update pages automatically, so don't collaborate with multiple people or use a workflow at the same time.
Author
Owner

@mdxlCJ commented on GitHub (Sep 30, 2024):

是进入工作流应用的流程编排、包括查看日志也会处罚自动更新吗,目前有什么方式避免吗

@mdxlCJ commented on GitHub (Sep 30, 2024): 是进入工作流应用的流程编排、包括查看日志也会处罚自动更新吗,目前有什么方式避免吗
Author
Owner

@Sakura4036 commented on GitHub (Sep 30, 2024):

sorry, I don't know about that.

@Sakura4036 commented on GitHub (Sep 30, 2024): sorry, I don't know about that.
Author
Owner

@dosubot[bot] commented on GitHub (Oct 31, 2024):

Updated comment text: Hi, @mdxlCJ. I'm helping the Dify team manage their backlog and am marking this issue as stale.

Your issue highlights a significant problem with collaborative workflows in version 0.8.3 of the Dify platform, where content can be overwritten when multiple users are involved. There have been discussions about implementing version control to manage concurrent edits, as I referenced, and other users have pointed out that the current design complicates multi-user collaboration due to automatic page updates.

Could you please let us know if this issue is still relevant to the latest version of the Dify repository? If it is, feel free to comment here to keep the discussion alive. Otherwise, you can close the issue yourself, or it will be automatically closed in 7 days. Thank you!

@dosubot[bot] commented on GitHub (Oct 31, 2024): Updated comment text: Hi, @mdxlCJ. I'm helping the Dify team manage their backlog and am marking this issue as stale. Your issue highlights a significant problem with collaborative workflows in version 0.8.3 of the Dify platform, where content can be overwritten when multiple users are involved. There have been discussions about implementing version control to manage concurrent edits, as I referenced, and other users have pointed out that the current design complicates multi-user collaboration due to automatic page updates. Could you please let us know if this issue is still relevant to the latest version of the Dify repository? If it is, feel free to comment here to keep the discussion alive. Otherwise, you can close the issue yourself, or it will be automatically closed in 7 days. Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5859