• Who started workflow?

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #22276  by aliism
 
How can I store username of who started the workflow? :)
 #22458  by noxious
 
You can create an Assignment Handler like this one:
Code: Select all
public 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);
	}
}
 #22486  by pavila
 
The swimlane initiator way is the right one. The other proposed method won't work always.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.