cancel
Showing results for 
Search instead for 
Did you mean: 

Adding variable in user task (without using listener) or extending its properties.

asaf000
Champ in-the-making
Champ in-the-making
Hey,

Want would like to define different kind of 'user tasks',

We have a listener on the user task that needs to execute different kind of logic according to the task type,

Is there a way to define task variables within the process definition (without using listeners) so our listener will be able to pick them up and perform some logic based on them ?

Other option is to extend the properties (name / description) / etc in the task definition (such as 'type') and set it on the user task flow definition level, is that possible?


Thanks,

Asaf.
5 REPLIES 5

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Asaf.

May be I did not understand your question, but you can create variables before user task. (for example in the script task).

Regards
Martin

asaf000
Champ in-the-making
Champ in-the-making
Hey,
Thanks for answering, I know, but what we need is an extra property / variable on the -user task scope- but without using listeners on the user task,

Isn't there a way to extend the user task somehow to contain extra properties on the definition level ? such as:
<userTask id="uniqueId" type="fooType"/> ?

Thanks.

jbarrez
Star Contributor
Star Contributor
No, that would require engine changes (which is possible of course), but not out of the box.

asaf000
Champ in-the-making
Champ in-the-making
jbarrez, thanks for answering,
If I will send a patch to support 'task type' so others can enjoy the benefit of distinguishing between tasks will you accept it or we should consider forking?

Thanks.

trademak
Star Contributor
Star Contributor
On task there's the category property which can be used for this.
That's an easy way to differentiate between different task types.

Best regards,