Entity Locking / Blueprint locking
N
Nick Amato
Add the ability to "lock" specific blueprints or entities, making it impossible to delete or change them through the UI or API unless the blueprint becomes unlocked. If a blueprint has locked entities, those entities must be unlocked before the blueprint can be deleted.
This would just add a layer of security against accidental deletions or API misuse. Maybe you could even have an approval process around locking/unlocking a blueprint to go even further.
M
Mark Tarry
I've implemented such a mechanism - via having an
entity_lock
blueprint!In our use-case, we needed an automation to perform multiple API calls, and wanted to ensure that no changes occurred in between. Specifically:
- Fetch the entity - to read it's current relations values
- Make API call to another system - to fetch latest data
- Upsert the entity - to append/remove specific relation values
Note: this in itself was a process built to workaround another limitation: https://roadmap.port.io/ideas/p/upsert-entity-option-to-append-detach-relationships-rather-than-overwrite
So we wrap the above steps with:
1.a. Confirm no entity lock exists - abort if one does
1.b. Create entity lock
1.c. Fetch the entity
- Make API call to another system - to fetch latest data
- Upsert entity
- Delete entity lock
Not all of our automations employ the locking mechanism - only those which involve multiple API calls. So this is a clunky workaround at best.