AnsweredAssumed Answered

How to set a default task type

Question asked by on Apr 1, 2019
Latest reply on Apr 8, 2019 by roberto.gamiz

Hello all,


So, I have a workflow that requires all tasks to have additional information, which does not fit in the standard "bpm_workflowTask" that gets created by default by Alfresco.

I defined a different base task type, "my:baseTask", and added the additional slots for data there:



        <type name="my:baseTask">
                <property name="my:data1">
                <property name="my:data2">
                <property name="my:data3">
                <property name="my:data4">



I also have some more specialised task types that inherit from this one.


Now, in my workflow, I have added


to all the tasks (user or service) that I have. Except, obviously, the ones that need a more specialised type of task.


The start of my workflow goes directly to the first service task. So far so good. At the end of that task, if everything went successfully, and we exit via one of the transitions onto the next task (which happens to be a user task of one of the more specific types), the resulting task if of a custom type and has all the data it needs on it. However - if an exception happen, it gets caught, and the task ends by taking a different transition, it ends up on a different user task, which should be of type baseTask .But it's not. It always ends up being a default Alfresco task, so the additional data that I need on that task gets lost.


Any idea what I'm doing wrong? What's the easiest way of ensuring all tasks created in a workflow are of a given basic type, unless otherwise specified?


Any help much appreciated.