cancel
Showing results for 
Search instead for 
Did you mean: 

Assignment question.

fishandchips
Champ in-the-making
Champ in-the-making
Hello everyone,

I have 1 task assigned to a group of users, and I would like to assign a later task to the user who claimed that first task, and not to the whole group. How could I do that ?

For example: Somebody from the accounting group claim a task about writing a report, the report doesn't get validated, I would like to assign the rewriting task to this user only, and not the accounting group. One example given is a bit like that, apaprt from the fact the workflow is initiated by a specific user, so the initiator name is used as a variable throughout the workflow.
3 REPLIES 3

trademak
Star Contributor
Star Contributor
Hi,

Right, you could do to that with a task listener that listens to the complete event.
You can then add a process variable with the person who completed the task.

Best regards,

fishandchips
Champ in-the-making
Champ in-the-making
Thank you,

I now have another problem. After I created my TaskListener class, the option "Create Deployment Artifacts" from the eclipse Designer stopped working.
When I delete it, it works again, so something is telling me there's something wrong with my class even thought the editor doesn't show any error.

Here's the code :
package FinancialReportProcessLaunch;

import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;


public class ReportCompleteListener implements TaskListener{

@Override
public void notify(DelegateTask delegateTask) {
  delegateTask.setVariable("reportAssigneeName", delegateTask.getAssignee());
 
}


}

Thank you

fishandchips
Champ in-the-making
Champ in-the-making
Never mind,
I fixed my problem using
delegateTask.getExecution().setVariable()instead of
delegateTask.setVariable()