Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Nominations allow 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.

These documents will attempt to explain how to use the nominations architecture and provide other relevant information.

Lets go through an example for Crops (our first nomination type to be added).

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) and the name of the workflow group (CROP_NOMINATION) into the ‘nomination_type’ table along with Base object attributes :

nomination_type

name

workflow_group

…Base object

CROP

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

id

name

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

assignee_user_id

…Base object

1

MyFarm-xyz-saty

CROP

EXPERT-2345-ty

This will also result in a status update in the ‘nomination_status’ table. With references to the

nomination_status

status_id

nomination_id

workflow_status

notes

…Base object

1

1

2

-

Once created the nomination_id will be returned for insertion 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

  • No labels