How to add Task Element to a diagram?

I have to use the code
canvas = bpmnio.get(‘canvas’);
canvas._addElement( type, element, parent, parentIndex);
what will be the value of the argument for _addElement();
to add a new task to a existing task in diagram.
Any help is appreciated ? Thanks in advance.

This is internal API. We cannot give you assistance on that.

Okay, How can I insert new element dynamically to another element?

Checkout Modeling if you need an internal API for that.