OpenFn / lightning

OpenFn/Lightning ⚡️ is the newest version of the OpenFn DPG and provides a web UI to visually manage complex workflow automation projects.
https://openfn.github.io/lightning/
GNU Lesser General Public License v3.0
126 stars 34 forks source link

Branching edges(paths) should not connect to workflow triggers #2188

Closed christad92 closed 3 months ago

christad92 commented 3 months ago

We need to block users from connecting orphaned steps to the workflow trigger. When this happens, the workflow rejects every change to that step What a workflow looks like when a job is attached to a trigger. Image

After connecting the step to the workflow trigger, if I try to save changes, it returns an error "Workflow could not be saved" but I am not sure why I can't save the workflow. See images below

Image

Image

josephjclark commented 3 months ago

Ah that's a really easy fix!

In useConnect.ts, just add an extra test in getDropTargetError. Something like if the target is of type trigger