2

I am using bpmn-moddle to create bpmn tag. in which i have created Task element and have added extension elements to it. Below is my code

moddle.fromXML(xmlStr, function(err, definitions) {

        // add a root element
        var bpmnProcess = moddle.create('bpmn:Process', { id: 'MyProcess_1'});
        definitions.get('rootElements').push(bpmnProcess);
        var bpmnTask 
        bpmnTask = moddle.create('bpmn:Task', {id: i})

        var extension = moddle.create('bpmn:ExtensionElements')
        var game = moddle.createAny('wootz:property',  'http://wootz', {name: "taleoUrl"})
        extension.get('values').push(game) 

})

I have created a custom element using moddle.createAny(). and i want to add this custom element to another custom element. Below is the function i want to perform.

var goal = moddle.createAny('propertysss',  'http://vendor', {})
var game = moddle.createAny('wootz:property',  'http://wootz', {name: "taleoUrl"})

game.push(goal)

For the above line i am getting the error as push is not a function. can anyone help on how to add custom element to another custom element in bpmn-moddle

prateeknaik
  • 71
  • 1
  • 7

0 Answers0