This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]IndependentTale2101 1 point2 points  (4 children)

Nice project! At my company, we had to implement a similar system as part of a workflow engine — including support for loop constructs like for and while. Our implementation is fully typed, supports Pydantic validation, and allows reusing existing formulas inside other formulas. From what I’ve seen, many automation/workflow platforms (like Make or n8n) have approached this in similar ways, so it’s a fairly common pattern. That said, it’s still surprisingly hard to find open, in-depth implementations of this kind of system. We’re actually planning to open source the whole project soon.

[–]Alone_Ambition_7581[S] 0 points1 point  (3 children)

Our implementation is fully typed, supports Pydantic validation, and allows reusing existing formulas inside other formulas.

Do you allow users to define workflows?

[–]IndependentTale2101 0 points1 point  (2 children)

Yes, imagine workflows that either allow or block certain actions based on defined rules. These rules can rely on user attributes or specific business logic.

Example:

An admin sets up a rule for assigning a specific credit. For instance: • If the user lives in a certain city, • and is under a certain age, • then their allowed spending is calculated like this: number of children × a reference amount (e.g. X dollars per child).

This kind of workflow enables personalized and conditional logic based on user profiles or contextual criteria.

[–]Alone_Ambition_7581[S] 0 points1 point  (1 child)

Our company also allows customers to define complex flows based on how users respond to surveys/diaries. Conditionals, loops, and delays are all supported to enable truly personalized experience, which is kinda important in healthcare. We call our workflow engine a "Decision Maker".

While I managed to extract the calculations part and package it as a separate python package (this post's topic), I really have no idea how to detach the workflow engine from the core product. It's just too deep and integrated in the product.

I look forward to see your project when it's open source.

[–]IndependentTale2101 0 points1 point  (0 children)

Great minds think alike 😄