[jboss-dev-forums] [Design of JBoss jBPM] - swimlaneInstance overwritten when creating startTaskInstance
yoyoyoyo
do-not-reply at jboss.com
Fri Apr 20 10:26:48 EDT 2007
confused in TaskMgmtInstance createStartTaskInstance:
| public TaskInstance createStartTaskInstance() {
| ...
| taskInstance.setActorId(SecurityHelper.getAuthenticatedActorId());
| return taskInstance;
| }
|
this will overwrite any (if there is any) initialized swimlaneInstances related to this taskInstance because:
| /**
| * (re)assign this task to the given actor. If this task is related
| * to a swimlane instance, that swimlane instance will be updated as well.
| */
| public void setActorId(String actorId) {
| setActorId(actorId, true);
| }
|
| /**
| * (re)assign this task to the given actor.
| * @param actorId is reference to the person that is assigned to this task.
| * @param overwriteSwimlane specifies if the related swimlane
| * should be overwritten with the given swimlaneActorId.
| */
| public void setActorId(String actorId, boolean overwriteSwimlane){
| ...
| }
|
in our application we have to initialize all swimlaneInstances at processInstance creation time, in order to do reassignment dynamically before the start of a process.
So would it be better if the code looks like this:
| public TaskInstance createStartTaskInstance() {
| ...
| taskInstance.setActorId(SecurityHelper.getAuthenticatedActorId(), false);
| return taskInstance;
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039288#4039288
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039288
More information about the jboss-dev-forums
mailing list