On the Initial Value of Select

This is what I did when I created a selectbox

entryFactory.selectBox({
          id : 'taskType',
          label : '计算方式',
          modelProperty : 'con:taskType',
          selectOptions:[
            {
              name:'沟通',
              value:'CommunicateTask'
            },
            {
              name:'属性',
              value:'AttributeTask'
            },
          ],
          emptyParameter: true,
          validate(element, value){
            console.log(element,value);
          }
        }),

The selectbox defaults to the first value, but when saved as xml, the selectbox is empty. How do you solve this problem?

Hi @xuchaojavascript

What do you mean by ‘the selectbox is empty’. Are the options missing after reopening the diagram?

Hi
I solved it. Reference https://forum.bpmn.io/t/setting-default-attribute-for-elements/957/4 I met the same problem as the landlord in the article.Thank you very much for your reply. It’s going to be a big breakthrough.