Workflow: Batch Create Objects
Workflow: Batch Create Objects
This workflow is optimised for rapid capture on a mobile device when a user needs to create many new objects in a single location.
Flow Steps
- Initiation – The user selects a container space in the UI (dashboard search, spatial navigator, or by scanning a container tag). This sets the context for where newly created objects will be located (
insiderelationship). - Camera Mode – The application opens the device camera.
- Capture Loop
a. User takes a picture.
b. UI shows two buttons:
• Store as new object – saves current photo(s) as a new object stub.
• Add another picture – appends another image to the current object stub.
c. After Store as new object the camera immediately resets for the next shot.
d. Loop repeats until user hits Done. - Background Sync – While the user continues shooting, a background task:
• Uploads images to Supabase Storage (object-images/objects/ObjectInstance/<id>/…).
• Sends GraphQLcreateObjectmutations (multipart) to create eachObjectInstancewith a minimal dataset: primary image,insidecontainer, default owner, statusunprocessed. - Completion – User exits camera mode; objects appear in dashboards instantly via GraphQL Subscriptions.
Data Model Impact
- Each stub object has status
unprocessedso it shows up in the Inbox for later editing. - A temporary Batch concept is implicit – no dedicated node is created; once all objects are processed the notion of a batch disappears.
GraphQL Operations
mutation createObject(name, photos, containerId)– invoked per object stub.subscription objectUpdated– pushes completion events to other clients.
Open Items / TODO
- AI-based auto-naming / description suggestion on device.
- Offline buffering if the device is fully offline.
- Bulk undo option for accidental captures.