I’m working on a project where we use your library and everything is going really well. Most of the stuff we figured out by reading the source or by searching this forum, but there’s one thing we can’t figure out.
I want to add some DataInputs to a Task. I can fetch the task with the elementRegistry and create a DataInput element by using the moddle:
var elementRegistry = renderer.get('elementRegistry');
var moddle = renderer.get('moddle');
var taskElement = elementRegistry.get(someTaskId);
var ioSpecification = moddle.create('bpmn:InputOutputSpecification');
var dataInput = moddle.create('bpmn:DataInput');
Now here’s my question. How do I attach the DataInput to the Task? Reading the docs I think I need an ioSpecification that holds the DataInputs:
<task id="_2" name="Hello">
<ioSpecification>
<dataInput id="_2_param" name="Parameter" />
<inputSet>
<dataInputRefs>_2_param</dataInputRefs>
</inputSet>
</ioSpecification>
</task>
Thanks a lot!