[jboss-user] [jBPM] - Re: how to assign assignee to a task at run time

helal jean-noel do-not-reply at jboss.com
Mon Feb 28 12:35:47 EST 2011

helal jean-noel [http://community.jboss.org/people/jnhelal] created the discussion

"Re: how to assign assignee to a task at run time"

To view the discussion, visit: http://community.jboss.org/message/590147#590147

There is no time delay to consider.

If a user is assigned to a task directly into the process definition through the task note (<task name="MyTask" assignee = "Ayusman") and
the process exection reachs the task node "MyTask" then:

the task note instance of "MyTask" can be queried as one of those assigned to "Ayusman" from that moment: hat is TaskService.createQuery().assignee("ayusman").list() will return the task node "MyTask" of that process instance (among possible others task node instances), allowing you to step forward programatically.

So if i'm understanding your question: yes if the task node is reach 2 days after the process instance has started, the task is assigned exactly two days after too. But please remark that it is rather the task node that is assigned '(among possible others) to the user. What you are doing programmatically then is: 1/ query all tasks that are assigned to the person currently connected to your app and 2/ display tasks for possible step forward to the user (some buttons and fields triggering Task.completetask() method).


Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110228/96f1a548/attachment.html 

More information about the jboss-user mailing list