Graph Databases
Check approval against the graph snapshot
BOTIE
Examples, experiments and workspace controls
Connect a tool's inputs to see what it produces. You can try a branch before connecting it to Result.
Try your own inputs
Use a copy of the example to try your own data. Keep the problem's assumptions in mind, and predict the effect of a change before checking the output. You can also add another branch to compare two ways of doing the calculation.
Context for this challenge
Keep only requests whose approved field is boolean true. Inspect which records remain before checking their snapshot revisions.
An approved request can become stale before it reaches the executor.
Inspect the component calculation
Keep explicitly approved requests( Requests: Proposed requests and approvals )
Examples and results
- Proposed requests and approvals
[ { "id": "P7", "expected_revision": 2, "approved": true }, { "id": "P8", "expected_revision": 3, "approved": true }, { "id": "P7", "expected_revision": 2, "approved": false } ]- Required result
[ { "id": "P7", "expected_revision": 2, "approved": true }, { "id": "P8", "expected_revision": 3, "approved": true } ]
- Proposed requests and approvals
[ { "id": "P8", "expected_revision": 4, "approved": true } ]- Required result
[ { "id": "P8", "expected_revision": 4, "approved": true } ]
Try a fresh construction
This clears this draft, including its undo history. Earlier successful attempts stay recorded. Build again without opening hints to record an independent attempt.
Stuck? Inspect a worked construction
The tools below form one possible solution. You can assemble it, follow its signals, and undo that change to return to your own construction.
Assumptions and test precision
These components operate on the supplied records in your browser. They do not run a graph database or interpret Cypher. Numerical tests allow a difference of 0.001. Lists and structures must also have the right shape.
Your last tested pieces can start the full construction. An existing draft there keeps its own pieces.
Revision zero is valid but a numeric-looking string is not
This check uses the pieces from “Compare approved requests with the known snapshot”.
BOTIE
- Current node snapshot
Nodes and properties (4)
- W
- revision: 3
- X
- revision: 0
- Y
- revision: 6
- Z
- revision: 8
- No relationships in this result.
Inspect the node and relationship records
{ "nodes": [ { "id": "W", "revision": 3 }, { "id": "X", "revision": 0 }, { "id": "Y", "revision": 6 }, { "id": "Z", "revision": 8 } ], "edges": [] }- W
- Proposed requests and approvals
[ { "id": "X", "expected_revision": 0, "approved": true }, { "id": "Y", "expected_revision": "6", "approved": true }, { "id": "Z", "expected_revision": 7, "approved": true }, { "id": "missing", "expected_revision": 0, "approved": true }, { "id": "W", "expected_revision": 3, "approved": true }, { "id": "X", "expected_revision": 0, "approved": true } ]
Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.
Build a construction in the workspace above first. This case will test those pieces.
What can change between this snapshot check and a later write, and why is sending an email inside a retryable callback dangerous?
Treat approval, concurrency control and external-effect delivery as separate parts of the operation.
These components operate on the supplied records in your browser. They do not run a graph database or interpret Cypher.
Work through the Python challenges →