Closed mattsmithies closed 10 months ago
@jonwood2 I will be updating our policy repository with the latest ELV methodology, but the test is has all the information needed for linking with the marketplace api.
Note, that the uuid property will be injected into all externable referenceable core schemas (project, site, claim), to listen for data changes.
Overview
This is the SDK implementation use in the new API, the latter will be pushed up later.
Have a look at the ReadMe and review files, please provide any feedback.
Example flow:
Run this following test to understand how the Guardian SDK Helper can aid in simpler development of consuming the Guardian.
The class primarily is a range of decorator helper functions but there a number of core features that are helpful.
Namely:
The StateEntityListener expects a EntityStateWaitingQuery this will continually scan the guardian for an expected state after an action has occurred.
So, if you have created a "project" document, you can automate the scanning of guardian state for a "project" that is in the "waiting" state to be approved. As the guardian has alot of side-effects it can be slow to finalise state when compared to a regular REST API.
The Actions from the helper allows you to chain composable units logic together so, as above the action states.
Recommendation: As the Guardian platform is asynchronous, and you cannot necessarily know when data will be available. We recommend that UUIDs are set ahead of time within documents, this gives you a unique value that ensures you can scan for a unique entity (at DOVU our approach is to set this within field0 or uuid fields).
Usage with Guardian SDK Helper