OpenFn / OpenFn/kit

Consider making triggers distinct from steps in the runtime

Open
#1,402 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
21
Forks
23
Avg merge
1d 22h
Merged PRs (30d)
17

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the runtime's workflow and trigger handling, then compare the current structure with the official project spec. Determine how workflow starts and trigger IDs are represented, including the existing next relationship. Done means the design and implementation consistently distinguish triggers from steps without breaking workflow execution.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.