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

Define conditional transitions using JSON #64

Open
Tracked by #59
tomtitherington opened this issue Feb 23, 2024 · 0 comments
Open
Tracked by #59

Define conditional transitions using JSON #64

tomtitherington opened this issue Feb 23, 2024 · 0 comments
Labels
blocked: conflict/dependency Something else is blocking this. scope: backend Work involving the backend / Django REST project. size: hours This should take less than a day. type: feature A piece of functionality of the product.

Comments

@tomtitherington
Copy link
Contributor

tomtitherington commented Feb 23, 2024

Background & Context*

Users should be able to define conditional transitions that will be evaluated before the transitions are called/executed. This means that users can create if statements/branches within their flows.

Goal*

We want to allow users to apply conditional logic and branching statements to their flows.

Implementation Details*

We need to first agree on the JSON schema/format for defining these conditions. I think we can use the SQL/JSON Path Language from Postgres. Here's a basic idea of how it could work.

Probably just best to create a custom JSONField for the TransitionSchema.condition field and then this serialization can be taken care of by the ModelViewSet.

Acceptance Criteria*

  • Post the agreed JSON schema as a comment here. (We'll use this in the documentation)
  • A REST API endpoint where a user can provide this definition for an associated TransitionSchema. This is okay if it's just on the ModelViewSet of the existing TransitionSchema view.
  • This endpoint will create a new instance or update an existing one if necessary.

Dependencies

Blockers:

  • An endpoint/view to update/create a TransitionSchema needs to exist before this work can be started.

*required field.

@tomtitherington tomtitherington converted this from a draft issue Feb 23, 2024
@tomtitherington tomtitherington added type: feature A piece of functionality of the product. blocked: conflict/dependency Something else is blocking this. scope: backend Work involving the backend / Django REST project. size: hours This should take less than a day. labels Feb 23, 2024
@tomtitherington tomtitherington moved this to 🔖 Planned in Product Development Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: conflict/dependency Something else is blocking this. scope: backend Work involving the backend / Django REST project. size: hours This should take less than a day. type: feature A piece of functionality of the product.
Projects
Status: 🔖 Planned
Development

No branches or pull requests

1 participant