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

Consider allowing state, configuration and final state options to be declared in the expression #22

Open
stuartc opened this issue Feb 2, 2021 · 0 comments

Comments

@stuartc
Copy link
Member

stuartc commented Feb 2, 2021

Instead of having a growing list of configuration keys, or writing the state to disk before; consider those directives existing in the expression itself (being either added automatically by the server or directly by the user).

const state = getState(...)
const configuration = getConfiguration(...)

This would allow other things like multiple credentials for more complex jobs...

const myCert = OpenFn.getCredential('myCert')
...

And last but not least, unpacking finalState from core.

OpenFn.writeState(state)

The OpenFn provided functions would need to be bound to the job on the server in order to authenticate and tie back any data to the specific invocation etc.


This pattern is only achievable once we are able to write more than just callExpressions on the root - same as #21

@stuartc stuartc added this to the Language Spec 2.0 milestone Feb 2, 2021
@taylordowns2000 taylordowns2000 removed this from the Language Spec 2.0 milestone Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants