Skip to content

Consider making triggers distinct from steps in the runtime #1402

@josephjclark

Description

@josephjclark

At the moment, a trigger in the runtime is just a step with no expression.

It might be cleaner to represent triggers as a different array in the workflow:

{
  steps: {},
  triggers: { webhook: {}  }

A trigger would still have a next, so it is a kind of step really.

Workflows would have a rule like "execute from the first trigger" if a start isn't defined. That removes the workflow.start key, which is designed to set the default/intended start node. But workflows should start from a trigger- so by default you;d just start from a trigger. And if you want you can pass another trigger id.

This doens't really materially matter. But it might be a neater way to handle triggers internally, and keeps the workflow structure closer to the official project spec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Tech Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions