Skip to content

Drag & Drop: workflow with task having no position #613

@chloegugli

Description

@chloegugli

When we drag and drop a workflow that has tasks with position (metadata > positionTop/positionLeft tags) and tasks without position, an error occurs and the workflow isn't imported.
What happens is that in layoutNewElements function (Workflow view), we draw a graph of tasks that don't have positions. If a task has a position, we don't add it to this graph but some tasks might depend on it. This makes incoherent graph that can't be drawn (error when calling : dagre.layout().nodes(nodes).edges(edges).nodeSep(50).rankSep(100).run())
I tried adding a loop to check if one task doesn't have a position we add all the tasks in the loop (cf file joined) but this has side effects: as it loops through all tasks, the ones that are already in the studio (workflow designer) are re-positioned.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions