I'm developing a largeish application that will have custom finite state machines. That is, the admin users of the application will be able to create their own state machines, limited by little pieces of code that are pré built, lets call those tasks.
OK that is all fine and we are reaching a place where we think its going to work.
The big question is, depending on the tasks involved, we will need to force user to input a certain data.
For example, there is a certain fsm that will merge parcels. For that to happen, we need at least two input parcels and some data on the new resulting parcel.
How can we:
Store the data we need, which will be different, depending on the fsm and the tasks it will perform? I was thinking a big json blob.
Validate it, without going insane.
Background: Django, marionette js, Django rest Framework and PostgreSQL.
Async tasks and state changes with celery.
I'm asking this because I dont want to have many many fixed models tied up to a certain validation. That will eventually lead to a high number of tables and it will be harder to maintain. (And that why i suggested a json Field for storing all the data for each state, validate it, and if its all good, transition to the next state).
PS: Sorry for bad formatting. Using my phone without proper keyboard.