easy-flows icon indicating copy to clipboard operation
easy-flows copied to clipboard

[Feature Request] Can we built a parser that loads workflow definitions from JSON or YAML

Open sandeep-equal opened this issue 2 years ago • 4 comments

Could we build a simple Workflow Parser for reading JSON or YAML Definitions?

sandeep-equal avatar May 29 '23 10:05 sandeep-equal

Interesting suggestion. Does this mean given a JSON file describing a workflow and work, it will generate the code for it?

AmirNaghibi avatar Jun 10 '23 09:06 AmirNaghibi

We need not generate the code. The workflow framework could expose methods that take a JSON definition as Input and returns a Workflow Object as Output. Example: WorkFlow workflow = Workflow.load("definition.json");

sandeep-equal avatar Jun 12 '23 06:06 sandeep-equal

I know it's an old question though the issue is open so for YAML you can look at a project I forked from this one. It's been modified too much to contribute back. Write workflows in YAML, use a context for state, then trigger the workflow by a named id. https://github.com/rajkowski/easy-flows-playbooks

rajkowski avatar Apr 05 '24 01:04 rajkowski