-
Enhancement
-
Resolution: Won't Do
-
Major
-
jBPM 3.2.10
-
Low
Method setPooledActors(String... actorIds) of TaskInstance and SwimlaneInstance uses PooledActor.createPool(String[] actorIds, ...) method.
This method creates new instances of PooledActor and associates them to a taskInstance or swimlaneInstance, and therefore it always inserts new registers in table JBPM_POOLEDACTOR. However, method setPooledActors(Set<PooledActor> pooledActors) of the classes mentioned above associates directly the taskInstance or swimlaneInstance to the pooledActors, reusing them.
If method createPool were able to find existing pooled actors for the given actors (String[] actorIds parameter), it would be possible to reuse them, creating only the nonexisting pooled actors. In order to ensure it, a constraint unique (ACTORID_, SWIMLANEINSTANCE_) in table JBPM_POOLEDACTOR can be added to the database scripts.