Baudin999 / ZDragon_Old_002

ZDragon is moving to .NET!
MIT License
1 stars 3 forks source link

Flow Composition #17

Closed Baudin999 closed 4 years ago

Baudin999 commented 4 years ago

I would like to propose composing flow steps and type checking these steps.

Example:

flow Sample01 =
    compose
        API -> Service :: CustomerId -> Customer;
        Service -> Database :: CustomerId -> Customer;
    ;

Goal:

Currently we can only do calls after each other. Sometimes we'd want to have calls await each other; this awaiting is somewhat equivalent to function composition:

sequenceDiagram
    API ->> Service : CustomerId
    Service ->> Database : CustomerId
    Database -->> Service : Customer
    Service -->> API : Customer
image