Checkboxes are not saved in XML

Hello,

im trying to save my checkboxes in XML but its not happening.

greetings

Greetings,

sorry to hear about your checkboxes. Mind providing some context? Maybe we can help you.

Hey, sorry for the bad description. I work like the bpmn-js-examples/properties-panel-extension at master · bpmn-io/bpmn-js-examples · GitHub example. I made a group “Status” with 7 Checkboxes as custom properties. My Group:

`function createStatusGroup(element, injector) {
const translate = injector.get(‘translate’);
const group = {
label: translate(‘Status’),
id: ‘status’,
component: Group,
entries: [
…StatusProps({ element })
]
};
if (group.entries.length) {
return group;
}
return null;
}
My Extension modeler look like :
{
“name”: “Status”,
“prefix”: “status”,
“uri”: “http://status”,
“xml”: {
“tagAlias”: “lowerCase”
},
“types”: [
{
“name”: “CheckboxElement”,
“extends”: [
“bpmn:BaseElement”
],
“properties”: [
{
“name”: “checkbox1”,
“isAttr”: true,
“type”: “Boolean”,
“title”: “Checked”,
“default”: true,
“selectOptions”: [
{“name”:“Checked”,“value”:true},
{“name”:“Unchecked”,“value”:false}
]
},
{
“name”: “checkbox2”,
“isAttr”: true,
“type”: “Boolean”,
“title”: “Checked”,
“default”: true,
“selectOptions”: [
{“name”:“Checked”,“value”:true},
{“name”:“Unchecked”,“value”:false}
]
},

here is a short section of my StatusProps:

function checkbox1(props) {
const modeling = useService(‘modeling’);
const { element, id } = props;
const getValue = () => {
return element.businessObject.checkbox1 || false;
}
const setValue = value => {
return modeling.updateProperties(element, {
checkbox1: value
});
}
return <CheckboxEntry
id={ id }
label={ ‘servus’ }
getValue={ getValue }
setValue={ setValue }
/>
}

I cant untick my checkboxes like that and they are also not saved when i download the XML. What did i wrong?

Idk what i did but its working now thx :smiley:

1 Like