OpenFn / kit

The bits & pieces that make OpenFn work. (diagrammer, cli, compiler, runtime, runtime manager, logger, etc.)
8 stars 12 forks source link

Runtime: allow re-usable functions across a workflow #648

Open josephjclark opened 3 months ago

josephjclark commented 3 months ago

It's fairly common in implementation to have to use the same helper function in multiple jobs. Water-aid, for example, defines a very complex function called convertToLocalCurrency which is duplicated in two jobs.

We need to be able to declare a function somewhere, and re-use it across multiple jobs. This probably plays into the unit-testing story too.

The difficulty of course is that if you write a function to state, it'll be destroyed at the end of the job when the state is serialised

josephjclark commented 3 months ago

Quick brainstorm of options: