cancel
Showing results for 
Search instead for 
Did you mean: 

adding participants to workflow

georgeclee
Champ in-the-making
Champ in-the-making
Is there a way to add participants to a workflow after the workflow sequence have already started? 

for example, if i have a simple document review workflow where the list of reviewers (who will all receive "review tasks") are defined initially.  once the workflow starts, and the list of reviewers have been assigned their review tasks, is it possible to amend the list with additional reviewers so they are also sent the task as part of the same workflow?

I don't seem to be able to implement this.

Thanks!
4 REPLIES 4

trademak
Star Contributor
Star Contributor
Hi,

This depends on how you implemented the process. Are you using a multi instance construct?
Or did you assign a user task to a candidate group?

Best regards,

bwd
Champ in-the-making
Champ in-the-making
I'm in a similar situation.  We're using the multi-instance construct to create a set of tasks for each user in the group (all of which must be completed for the workflow to progress).  Is it possible to add a new user task in this scenario (after the multi-instance has been evaluated to get the list of users to create tasks for, but before all of the other related per-user tasks are completed)?

My understanding of the group case is that the group represents a set of potential owners - any one of which could claim and complete the task.  I can see how you could add users to the group who would then be potential owners of the single task, but our usage requires a set of task be assigned to all users in the group.

Is my understanding correct?  If so, is there an alternative mechanism to accomplish what we're trying to do?

Thanks,

bwd.

trademak
Star Contributor
Star Contributor
Hi,

Yes your description is correct. What you need is an eventing mechanism where you can add new instances to the multi instance.
There's no standard way to do this in Activiti. This would need some serious coding to get it working.
You would need to retrieve the multi instance scope and add a new execution to it. That's pretty low level in the core of the process engine.

Best regards,

bwd
Champ in-the-making
Champ in-the-making
I see a similar question in another forum topic:  http://forums.activiti.org/en/viewtopic.php?f=6&t=370&p=1433&hilit=dynamic+subtask#p1433, and it looks like dynamic sub-tasks are implemented: http://jira.codehaus.org/browse/ACT-117.

Question:  Can either dynamic sub-tasks or TaskService.newTask() be used to create 'ad hoc' tasks dynamically and associate them with a pre-existing set of tasks?  (I wasn't able to find any documentation details on either of these.)  It's not clear that you can associate a new Task with a pre-existing process, but it looks like you can associate it with another task - via Task.setParentTaskId().  Ideally, these tasks would appear like other tasks wrt querying, …, etc. Like L.Marinkov, i'd really like to be able to accomplish this via public interfaces without having to dive down into the engine implementation.

Thanks,

bwd