The mission of LiteFarm is to meet farmers where they are and equip them with the tools they need to make informed and responsible decisions about the health of their farm, their livelihood, their community, and the planet. Part of meeting them where they are is to acknowledge that farmers bring a lot of knowledge to the table that we, as the LiteFarm community and LiteFarm affiliated researchers, can learn from. As such, we need to have a general framework that allows for our incredibly diverse user base to suggest new information and patterns that should be incorporated into the application.
The nominations framework is a first step towards building a generalized framework that allows users to not only create or suggest custom structures within LiteFarm (past examples include custom tasks and varietals) for use on their own farm, but to suggest or create those structures for use across the ecosystem. This framework is primarily meant to support the back-end storage of data and workflows around handling that data. User interfaces are likely to be implemented on a case-by-cases basis and review of nominations to happen outside LiteFarm by an expert in that topic (at least in the short term).
The nominations framework provides an extensible structure for users to suggest data points for inclusion into LiteFarm's seed 🌱 database. Nominations could be many things including crop varieties, task types, expense types, tool types etc., though this write-up will focus on crop_types.
These documents will attempt to explain how to implement the nominations architecture and provide other relevant information.
Crop Nominations - EXAMPLE
Nominations need to go through an evaluation workflow in order to be added to our seed database to be offered as templates for other users.
So in we as administrators go to our database and we add the name of our nomination type (CROP_NOMINATION) and the name of the workflow group (CROP_NOMINATION) into the ‘nomination_type’ table along with Base object attributes :
nomination_type
nomination_type | …Base object |
---|---|
CROP_NOMINATION | … |
Now that we have named the workflow group to CROP_NOMINATION we can enumerate the steps in the ‘nomination_workflow’ table under that group.
nomination_workflow
workflow_id | status | type_group | …Base object |
---|---|---|---|
1 | LF_REVIEW | CROP_NOMINATION | … |
2 | NOMINATED | CROP_NOMINATION | … |
3 | EXPERT_REVIEW | CROP_NOMINATION | … |
4 | REJECTED | CROP_NOMINATION | … |
5 | APPROVED | CROP_NOMINATION | … |
At this point we would like to create our nomination system to create a new nomination object when a user selects
- Nominate this crop for inclusion Litefarm’s catalogue
in the “Add New Crop” flow.
On creation of the new crop a new nomination object will be created in the ‘nomination’ table:
nomination
nomination_id | farm_id | nomination_type | …Base object |
---|---|---|---|
1 | MyFarm-xyz-saty | CROP_NOMINATION | … |
This will also result in a status update in the ‘nomination_status’ table. With references to the other tables.
nomination_status
status_id | nomination_id | workflow_id | notes | …Base object |
---|---|---|---|---|
1 | 1 | 2 | - | … |
Once created the nomination row will be returned for insertion on the nomination_id into the crop table.
crop
nomination_id | …other Crop table columns |
---|---|
1 |
Hopefully at some point in the future this will also create a task for the assignee. Which will then push more status updates etc.
task
task_id | assignee | task_type | ..other Task table columns |
---|---|---|---|
45776 | EXPERT-2345-ty | CROP_NOMINATION_EXPERT_REVIEW |
Things to consider
Do you want to save the nomination object as it is now? Is it immutable?
This functionality is not yet implemented.
Not yet implemented
Immutable nominations
Administrative Task Types
views
litefarm - add new nomination point
user - My Nominations
agronomist - Nominations In Your Area