[jboss-user] [JBoss jBPM] - Re: Dynamic task creation

massimiliano_cuccia do-not-reply at jboss.com
Thu Apr 24 11:03:41 EDT 2008

I've tested the dleerob solution. But it doesn't works.

this is the image of the process i'm modelling

and this is the par file

As you can see in this code

  |    <node name="inizioInterpello">
  |       <event type="node-leave">
  |          <action name="actionIstruttoriaInterpello" class="it.unict.interpello.IstruttoriaInterpello"></action>
  |       </event>
  |       <transition name="toFork" to="fork1"></transition>
  |    </node>
when the token leaves the inizioInterpello node I execute the action class IstruttoriaInterpello. This is the place where the new task instances are created.

Next you can see the relevant code of IstruttoriaInterpello: for each selected user, I create a new task, cloning "task compilazione".

  |         TaskMgmtDefinition tmd = (TaskMgmtDefinition)executionContext.getDefinition(TaskMgmtDefinition.class);
  |         Task task = tmd.getTask("task compilazione");
  |         TaskMgmtInstance tmi = executionContext.getTaskMgmtInstance();
  |         TaskInstance taskInstance = tmi.createTaskInstance(task, executionContext);
  |         taskInstance.setActorId(user);

BUT (here is the problem)
the newly created task has two leaving transictions named "tr1" and "tr2", and doesn't have the (aspected) leaving transiction named "toJoinFromCompilazione".

dleerob, do you have similar problems?
anyone knows why this appens?


PS sample at 11.2.2 http://docs.jboss.com/jbpm/v3/userguide/taskmanagement.html#taskinstancesandgraphexecution
is very very similar to the dleerob code

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4146545#4146545

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4146545

More information about the jboss-user mailing list