ru-fix / completable-reactor

CompletableReactor framework makes it easier to create business flows that have concurrently running parts and complex execution branching.
https://ru-fix.github.io/completable-reactor
MIT License
12 stars 2 forks source link

Create CompileTimeGraph from RuntimeGraph #31

Open KuznetsovVlad opened 4 years ago

KuznetsovVlad commented 4 years ago

When app starts ComletableReactor creates RuntimeGraph form dsl presentation of graph. That graph may be configured in wrong way. To prevent wrong configration we need apply validation procedure to the RuntimeGraph.

Graph is visualized by IntellijIdea plugin. For creating a view use CompileTimeGraph. It is made from .java source file by JavaSourceParser.

In bouth of these scenarios we want to know if the graph configured incorrectly. To rich this we need to apply the validation procedure. But RuntimeGraph and CompileTimeGraph are different and validation procedures will be diffrent too. To prevent of creation and support two different codebases we could create CompileTimeGraph based on RuntimeGraph and apply validation to CompileTimeGraph. That is when Runtime graph created we create CompileTimeGraph and validate it and the same validation we use when graph is vizualized after parsing source files.

TODO: Create a component that transforms CompileTimeGraph from RuntimeGraph. Important thing is that we should be confident that the model created from RuntimeGrpah is equal to the model created from parsing source file for the same graph.