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

Trigger: when an action succeeds / fails #970

Open
gabestein opened this issue Feb 11, 2025 · 1 comment
Open

Trigger: when an action succeeds / fails #970

gabestein opened this issue Feb 11, 2025 · 1 comment
Assignees
Labels

Comments

@gabestein
Copy link
Member

gabestein commented Feb 11, 2025

Motivation

So users can chain together actions! e.g. when a pub successfully gets a DOI, it moves on to a "ready to publish" stage.
So users can run actions in a stage in order -- e.g. first pull from airtable, then pull from google drive (could also do this with moves, but would need to trigger moves)

Requirements

  • New labels on all action rule dialogues to clarify what each dropdown is selecting
  • Two new event types in action rules: "When an action runs successfully..." and "When an action fails..."
  • When one is selected, a new dropdown labeled "Action" appears that allows users choose from a list of configured actions in that stage that, when run, will cause the selected action to run
  • Once configured, rule runs selected action when another action has succeeded or failed
  • Warn the user if there is an infinite loop in the same stage and prevent them from creating the trigger

Acceptance Criteria

  • Two new rules and corresponding Events should be added for the "action run succeeded" and "action run failed" events.
  • Each new rule should have an additional configuration that specifies the action instance to observe for successes/failures.
  • To prevent loops, action that triggered and triggered action cannot be the same

Mockups (if available)

Image

@gabestein
Copy link
Member Author

gabestein commented Feb 11, 2025

I know, I know, controversial, but we're getting a lot of requests for some way of doing this — can also see using field updates as a way to do this, but this seems a little simpler, especially because not all actions have great field-writing capability.

When that action has a successful run on a pub, the next action is triggered. If the action runs but fails, no action is run.

I could also see a version that's just "when an action runs..." and has the ability to set an action to run for "when it succeeds" and "when it fails"

We could also restrict this to moving stages rather than allowing all actions to be run as a result of the trigger to keep it more constrained (although that's less cool!).

@gabestein gabestein changed the title Trigger: When an action runs successfully Trigger: when an action runs Feb 20, 2025
@gabestein gabestein changed the title Trigger: when an action runs Trigger: when an action succeeds / fails Feb 20, 2025
@3mcd 3mcd added the 3-day label Feb 24, 2025
@gabestein gabestein moved this from Ready to In Progress in PubPub Legacy & Platform Combined Workstreams Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

3 participants