How update ui viewer when change name bpmn activity

hi
i want change bpmn:name actvity with jquery .
after change dont update ui digram
when resize task Shows changes
i want render agin or refresh

var elementRegistry = modeler.get('elementRegistry');
    var sequenceFlowElement = elementRegistry.get($('#taskid').val()),
    sequenceFlow = sequenceFlowElement.businessObject.name;
    //alert(sequenceFlow);
    sequenceFlowElement.businessObject.set('bpmn:name', "test");

Not sure why you’d bring jQuery into the mix. The reason you’re not seeing your changes reflected immediately is that no one will know if you just change the business object directly. The proper way to do this is to use the Modeling API:

modeling.updateProperties(sequenceFlow, { name: 'Foo' });
2 Likes

iam us ethis code var startEventShape = elementRegistry.get($('#taskid').val()); modeling.updateProperties(startEventShape, { name: $("#typetitle").val() })
not seeing your changes reflected immediately

commandStack.changed;