I managed to solve it. Created new elements in BPMN2.ecore with propriate attribute/value pairs, regenerated model editor and edit code and now it works. The thing that I was missing was the creation of my custom elements also under the DocumentRoot model in bpmn2.ecore file.