October 2024

Enhancements to Entity Service

4min
we have introduced two major enhancements to the entity service that streamline the process of updating entity states and attributes new api changes single api for state transitions and attribute updates this enhancement allows developers to update both the state of an entity and its attributes in a single, idempotent api call by combining both operations in a single request, this feature reduces the complexity of making multiple api calls and ensures atomic execution introduction of a new statetransition object within the api request body developers can now pass both properties and statetransition objects in the same request body to update attributes and perform state transitions in a single call two new response events for success and failure scenarios have been added entityattributeandstateupdationsuccessevent entityattributeandstateupdationfailedevent two new fields for both success and failure events have been added eventcode code that represents the state transition event reasoncode justification for the state transition conditional updates support to entity service we have added support for conditional updates using jexl expressions this enables developers to apply updates to an entity's attributes only when certain conditions are met, providing more precise control over update logic conditional expression support developers can now include conditional logic in their update requests using jexl (java expression language) syntax this ensures that updates are only performed when specified conditions are met batch updates conditional updates extend to batch operations, allowing multiple entity instances to be updated within a single api call, with each instance having its own condition documentation to get started with these updates refer to the following documentation developer guides update attribute and state with a single api update entity with conditional updates update entities in batch with conditional updates api reference documentation