Hi @philippfromme,
I write code to create custom property but now I facing an issue
Cannot read property ‘id’ of undefined
My code for isStartable
as below,
export default function(group, element, translate) {
if (is(element, 'bpmn:Process')) {
var isStartable = entryFactory.checkbox({
id: "isStartable",
get: function(element, node) {
var bo = getBusinessObject(element);
return {
'isStartable' : bo.$attrs.isStartable || true
}
},
set: function (element, values, node) {
let bo = getBusinessObject(element);
let theValues = values.isStartable
return cmdHelper.updateBusinessObject(element, bo, {'isStartable': theValues});
},
label: translate('isStartable'),
modelProperty: 'isStartable'
});
group.entries.push(isStartable);
}
My implementation of this property as below,
function createGeneralTabGroups(element, bpmnFactory, canvas, elementRegistry, translate) {
var generalGroup = {
id: 'general',
label: 'General',
entries: []
};
idProps(generalGroup, element, translate);
nameProps(generalGroup, element, bpmnFactory, canvas, translate);
processProps(generalGroup, element, translate);
executableProps(generalGroup, element, translate);
isStartableProps(generalGroup, element, translate);
return[
generalGroup
];
}
Custom property description JSON,
{
"name": "Input",
"prefix": "Input",
"uri": "http://Input",
"xml": {
"tagAlias": "lowerCase"
},
"associations": [],
"types": [
{
"name": "BewitchedStartEvent",
"extends": [
"bpmn:StartEvent"
],
"properties": [
{
"name": "Input",
"isAttr": true,
"type" : "array",
"default": "Select Value"
},
{
"name": "output",
"isAttr": true,
"isMany": true,
"type" : "array"
},
{
"name": "isStartable",
"isAttr": true,
"type" : "boolean"
},
]
},
]
}
I implemented this property the same way I implemented other custom properties but I never faced such kind of issue.