0.2.5 • Published 5 years ago

animaltracking-network v0.2.5

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
5 years ago

Animal Tracking Network

This is an Animal Tracking Business Network based on UK DEFRA government regulations (https://www.gov.uk/animal-movement-england). Farmers can move animals between farms/fields and the UK government farming regulator has visibility into the locations of all animals and all animal movements between farms.

This business network defines:

Participants Farmer Regulator

Assets Animal Business Field

Transactions AnimalMovementDeparture AnimalMovementArrival SetupDemo

Each Farmer owns a Business that is identified by a Single Business Identifier (SBI). A Farmer owns a set of Animals. A Business owns a set of Fields. A Field contains a set of Animals owned by the Farmer. Animals can be transferred between Farmers or between Fields.

To test this Business Network Definition in the Test tab:

Submit a SetupDemo transaction:

{
  "$class": "com.biz.SetupDemo"
}

This transaction populates the Participant Registries with two Farmer participants and a Regulator participant. The Asset Registries will have eight Animal assets, two Business assets and four Field assets.

Submit a AnimalMovementDeparture transaction:

{
  "$class": "com.biz.AnimalMovementDeparture",
  "fromField": "resource:com.biz.Field#FIELD_1",
  "animal": "resource:com.biz.Animal#ANIMAL_1",
  "from": "resource:com.biz.Business#BUSINESS_1",
  "to": "resource:com.biz.Business#BUSINESS_2"
}

This transaction moves ANIMAL_1 from FIELD_1 at BUSINESS_1 to BUSINESS_2.

Submit a AnimalMovementArrival transaction:

{
  "$class": "com.biz.AnimalMovementArrival",
  "arrivalField": "resource:com.biz.Field#FIELD_2",
  "animal": "resource:com.biz.Animal#ANIMAL_1",
  "from": "resource:com.biz.Business#BUSINESS_1",
  "to": "resource:com.biz.Business#BUSINESS_2"
}

This transaction confirms the receipt of ANIMAL_1 from BUSINESS_1 to FIELD_2 at BUSINESS_2.

Congratulations!

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.1.14

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.13

6 years ago

0.1.11

6 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago