How to show documentation attribute to the elements in xml

i wanna update documentation attribute and show it in the elements something like that is that possible?

<task id="task_f692e8fb-53fd-4907-894b-12c3a4300ab8" name="user has logged on successfully" documentation="{type: 'test'}">
	<incoming>sequenceFlow_73e633bc-4e7d-4876-ab5c-5d29f9df577b</incoming>
	<outgoing>sequenceFlow_99ee3d1c-3bee-4d4e-b040-2251fb2fffbe</outgoing>
</task>

Hello @mdichkou.

Could you attach a screenshot / mockup to your post to provide additional context? It is not clear to me whether you’d want to show the documentation in an extra panel, on the diagram or wherever.

i’m trying to add new elements to documentation and i want that to be display it in the task element attributes like that <task id="task_f692e8fb-53fd-4907-894b-12c3a4300ab8" name="user has logged on successfully" documentation="{type: 'test'}">, here is my code
image

Will that help you?

const a = moddle.create('bpmn:Task', {})
a.$attrs.documentation = '{types: "test"}'

image

1 Like

Yes thank you so much !

is it possible to update it after ? if yes how i can do that ?

Still not 100% sure what you’d like to accomplish.

But may be worth checking out the commenting extension that displays comments read from extension elements and properly maintains them during editing.

You could also use the BaseElement#documentation native BPMN way to attach documentation.

the answer of @xu.zhang is working fine for me but i would like to update the a.$attrs.documentation after the element created

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.