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).
Regards
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/590147#590147]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]