How to set a inner properties for a shape element

In reference to this question

How can I update the inner properties of the object

let’s say I want to update timer definition for start with timer shape,

as it is inside the object like

element.businessObject.eventDefinitions[“0”].timeDate.body

so how to update such properties.

Just access these properties I guess?

var element = elementRegistry.get('someElement');
var businessObject = element.businessObject;

// traverse + set property at will

For updating in an undo / redo friendly way consider writing your own CommandHandler.

We got the UpdateBusinessObjectHandler in the properties panel that does this.