Creating ExtensionAttribute to a user task

I would like to add some domain specific attributes to a task so I can group together certain types of task.
I notice that though the RepositoryService I can access the FlowElements and the ExtensionAttributes. How can I create new attributes (strings) that can be added to a user task definition?

Hi Garyb.

You can just add your extension elements to the model xml.
If you want to be able to specify values in the modeler, add them to the model’s palette.


Thanks Martin,
I have added to the .bpmn file and can see the list of ExtensionElement when I query the FlowElement. I have created a userTask with a new ExtensionElement that contains a simple text value. What I’d like to do now is query for all task that have a particular value for the new ExtensionElement, as I currently do for the Category.
However, there doesn’t seem to be a way to create a TaskQuery that does this :frowning:
I looking to Categorise, and sub-categorize userTasks - can you make any other suggestions?
Thanks and regards,

Hi Gary,

What you could do is to distinguish this type of tasks in some way. e.g. put special definition key to a created tasks or taskDefinitionId can differentiate these task instances too. After that use taskQuery with given taskDefinitionKey or taskDefinitionId.