You can create an Assignment Handler like this one:
Code: Select allpublic class GetWorkflowCreator implements AssignmentHandler {
/**
* This class assigns the task at the user who started the workflow.
*/
private static final long serialVersionUID = 1L;
@Override
public void assign(Assignable assignable, ExecutionContext executionContext) throws Exception {
// TODO Auto-generated method stub
Session s = JCRUtils.getSession();
String user = s.getUserID();
s.logout();
assignable.setActorId(user);
}
}