-
1. Re: extending tasks
rams.rapol Aug 20, 2009 5:24 PM (in response to sravyts)with jbpm4, you can use custom-task or extend TaskActivity class
-
2. Re: extending tasks
sravyts Aug 21, 2009 5:34 AM (in response to sravyts)We don't want to create custom tasks, we want to extend the task object's data model.
So it is not the execution we want to change, but the actual task persisted data model. -
3. Re: extending tasks
kukeltje Aug 21, 2009 6:03 AM (in response to sravyts)Uhhhmmm... if you want to extend the datamodel you have to have a corresponding class. In jBPM4 that is the TaskActivity class, so by extending that and changing the corresponding config files you achieve what you want I think, so rams.rapo is right
-
4. Re: extending tasks
sravyts Aug 24, 2009 2:37 AM (in response to sravyts)But in jbpm3 we could register a custom task factory, so the tasks were created using the extended class with the extra properties initialized in the constructor (using the execution context).
I can't seem to find anything in the manuals (user en dev) for doing this? -
5. Re: extending tasks
kukeltje Aug 24, 2009 3:25 AM (in response to sravyts)that same can be done in jbpm4 with changing the file (jbpm.jpdl.activities.xml) that references the task activity (no factory needed). That is what rams.rapo meant. You might need to change ./pvm/src/main/resources/jbpm.task.hbm.xml as well but that might depend on what you want.
What is even greater, you can change more of the behaviour of the task in jbpm.jpdl.activities.xml
But keep in mind that this part is not fully stabilized yet -
6. Re: extending tasks
sravyts Aug 24, 2009 9:16 AM (in response to sravyts)When I look closer into the source code I can see what you are trying to suggest (extend TaskActivity) and create my own kind of task and use this one in the execute method of TaskActivity (correct me if I'm wrong).
But the actual creation of the TaskImpl object is happening in the DBSessionImpl class. Isn't it dangerous not using this anymore (it is used in two other locations as well: NewTaskCmd and createSubTask() in TaskImpl )?
Also, this would mean that I have to duplicate all the code from TaskActivity - execute method (and hope it doesn't change too much). -
7. Re: extending tasks
kukeltje Aug 24, 2009 10:19 AM (in response to sravyts)Ah... ok I personally missed that. Will look into that in a few days since this would mean extensibility is less easy.