[Design of JBoss jBPM] - Re: task component interface comments
by alex.guizar@jboss.com
Creating tasks without a user-provided ID is a must for usability. The generated ID will be the database ID converted to string.
As for task creation, I concur with Joram that (ab-)using the setters for a fluent interface goes against the JavaBeans design principles. Introducing a set of methods called withXXX to the Task interface is also a no-go because they mostly duplicate the setXXX methods.
I propose introducing a TaskBuilder buildTask() method to the TaskService, and move the withXXX methods to TaskBuilder. Actually I'd prefer to drop the "with" prefix, as follows.
Task task = taskService.buildTask()
| .name("test")
| .dueDate(today)
| .asignee(me)
| .done();
TaskBuilder does not even have to be an interface, because it simply delegates to methods in the Task interface.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4195136#4195136
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4195136
17 years, 4 months
[Design of JBoss jBPM] - Creatiing new pooled actors for every task instance
by stringaling
Hi,
I have noticed that for every new task instance that contains an assignment to a pooled-actor within a process, there are new entries added to the jbpm_pooledactor table.
This behavior is a wee bit undesirable, as we end up creating a rapidly growing large table with very redundant records.
The table contains a 'VERSION_' field which would seem to indicate that at least some thought might have been put into doing this differently.
Is there any plans to work on assignment in upcoming releases ? Or is this just how it is going to work for a while ?
Example of my assignment:
| <task name="Manual Address Review">
| <assignment pooled-actors="WD User"/>
| </task>
|
(The same behavior exists with swimlanes)
The source of my concern is trying to improve performance when getting a task list for when there are a large number of outstanding tasks. The number of joins required to do this is expensive, and could possible be reduced if there was a consistent ID for pooled actors in the JBPM_POOLEDACTOR table.
(Couldn't these assignments, actors be determined and setup at the time of process deployment, rather then as part of creating a task instance ?)
Thanks,
David Stringer
(Jboss 4.0.5, Jbpm 3.2.2, Java 1.6, Oracle 10g)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4195127#4195127
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4195127
17 years, 4 months