• Selecting specific Users from an actor pool during a Workflow

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
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.
 #31115  by DMT
 
Hi Guys,

I just wanted to ask if we could implement the following Workflow. I would like to add that we have created actor pools so every role has many Users. For example, Assume there are two roles 'Creator' and 'Manager' and both roles have multiple users (Say User A and User B for Role 'Creator' and User C and User D for role 'Manager'). Hence, what I want to implement is if User A starts the Workflow, then he should be able to choose either 'User C' or 'User D' from a dropdown and the workflow will proceed to that User. Let me know if its possible to do so.

To summarize, this is how the Workflow should work:

1) A User from the Role 'Creator' Uploads the document in OpenKM and Starts Workflow
2) That User gets a dropdown which shows the list of User's from the Role 'Manager' and selects one of them.
3) That selected User then reviews the document and should he accept, the workflow ends
4) If that User rejects, then the Workflow will go back to the Creator (initiator)
 #31124  by pavila
 
Yes, it's possible. You have to use a form with a Select which should be filled with users with this role. After that, you also should implement an AssignmentHandler which make the task assignation from the value of the previous Select.

To fill this Select you can inyect the data from an ActionHandler.
 #31142  by CBD007
 
Hello Pavilla....I'm rokie to openKM I get stucked at point where I can't able to add role or userid into select attribute tag of form.xml ....could it possible for u to provide me code snippet of assigning role or userid into select tag of form.xml....looking forward to u r response...thank u..
 #31143  by CBD007
 
Hello Guys...
In two ways I tried to add dynamiclly userid to select attribute of form.xml

1) By using query:
In this method I added query to the optionsQuery proerty of select tag, the problem arises when I am able to reterive values from User table but can't able to display those values in drop down list in openkm form. refer the following code to help out from this issue
Code: Select all
<select label="User Id's" name="userId" type="simple" table="User"
 optionsQuery="select user.id, user.name from User as user Join user.roles as role where role.id in('ROLE_APPROVER')"/>
2) By using Assignment class:
I have created an assignment java class in that i have manully passed some user id's after that this class I need to be configure with select attribute, all those things I have done, but when I upload the created par file then I'm getting -- Attribute "class" must be declared for element type "select".

refer the following code that I have created in form.xml
Code: Select all
<workflow-form task="dropdown">    
	<select label="User Id's" name="pt.userId" type="simple" class="com.xyz.abc.Assign"/>
</workflow-form>

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.