Hi,
I am looking into updating extension attributes and elements following GitHub - bpmn-io/bpmn-js-example-model-extension: An example of creating a model extension for bpmn-js.
In the given example, the below part demonstrates how to set the value to attribute
const suitabilityScoreEl = document.getElementById('suitability-score');
const suitabilityScore = Number(suitabilityScoreEl.value);
if (isNaN(suitabilityScore)) {
return;
}
const extensionElements = businessObject.extensionElements || moddle.create('bpmn:ExtensionElements');
let analysisDetails = getExtensionElement(businessObject, 'qa:AnalysisDetails');
if (!analysisDetails) {
analysisDetails = moddle.create('qa:AnalysisDetails');
extensionElements.get('values').push(analysisDetails);
}
analysisDetails.lastChecked = new Date().toISOString();
const modeling = bpmnModeler.get('modeling');
modeling.updateProperties(element, {
extensionElements,
suitable: suitabilityScore
});
I understand how to update the attributes lastChecked
or nextCheck
.
But I am not sure how would I update qa:comment
? Suppose if I want to change the text body of qa:comment
, how would I do that?
Any help would be appreciated. Thanks!