Returns an Entity session handle for interacting with the workflow's
structured JSON document storage. Unlike search() (flat HASH
key-value pairs), entity() provides a JSONB document store with
deep merge, append, and path-based get operations.
Each call produces a unique session ID tied to the deterministic
execution counter, ensuring correct replay behavior.
Not available with workerCredentials. This method writes directly
to the jobs table (JSONB context column), bypassing the SECURITY
DEFINER stored procedures that scoped worker roles are restricted to.
Workers connecting with workerCredentials will receive a permission
error. Use entity() only in workflows running with full database
credentials.
Returns an
Entitysession handle for interacting with the workflow's structured JSON document storage. Unlikesearch()(flat HASH key-value pairs),entity()provides a JSONB document store with deep merge, append, and path-based get operations.Each call produces a unique session ID tied to the deterministic execution counter, ensuring correct replay behavior.
Examples
Not available with
workerCredentials. This method writes directly to thejobstable (JSONBcontextcolumn), bypassing the SECURITY DEFINER stored procedures that scoped worker roles are restricted to. Workers connecting withworkerCredentialswill receive a permission error. Useentity()only in workflows running with full database credentials.