Bonitasoft 6.2.6 community edition how to assign specific user to next task

1
0
-1

Dear Sir/Mdm,

I am using Bonitasoft community 6.2.6 and its getting frustrating. I am trying to figure out how to assign the next task to specific user. Is there a video or example ? I tried a few days but no results. Seems to be user unfriendly.

Terry

Comments

Submitted by ttoine on Wed, 05/14/2014 - 12:34

hello, did you read our documentation on actor filters ?http://documentation.bonitasoft.com/creating-actor-filter

Submitted by florian-meurs on Tue, 07/22/2014 - 17:04

I read the documentation and tried to figure it out, but it doesn´t really seem to help me. Here is my problem:

I am designing an onboarding process and after HR has registered the new hire´s data, the task of specifying the workplace and IT requirements should be assigned to the responsible hiring manager. The 5-star-and-a-kiss-solution would be that Bonita automatically recognizes the hiring manager´s name, which is entered during the new hire registration, and assigns the task to the hiring manager. However, if I have to assign the task manually, it would still be awesome. I haven´t found a connector or anything that would enable me to perform this, so I am very happy to hear your suggestions.

Submitted by aCordier on Wed, 07/23/2014 - 08:27

Your use case is interesting but some informations are missing. Is job applicant created as a user in Bonita during the hiring process ? Do you want to manage hierarchical relationship using bonita organization model ? Or do you just want to assign task to a username that was stored in a process variabe ? In all those cases you need to use actor filters, as said ttoine

Submitted by florian-meurs on Wed, 07/23/2014 - 11:04

Hey aCordier,

thank you for your reply. I´ll try to answer the questions: 1. No, the job applicant is not created as a user during the hiring process. 2. No, there is no hierarchical relationship between the users in the organization model. 3. Yes, that is exactly what I would like to do: Assigning the task to a username that was stored in a process variable - manually or automatically, I don´t care ;-)!

I will have a look at the documentation again, but I am afraid my programming skills are not sufficient to implement this. I will probably escalate it to the IT department, but thanks for your interest and help!

2 answers

1
0
-1

Did you get any further with this?

I think that the key is getting the userId that you need to supply to the actor filter. Here's one idea: In your first task you must have something like a select box with the list of hiring managers for HR manager to choose from. You could set the available values with a script that uses getPossibleUsersOfHumanTask (see the frist part of http://documentation.bonitasoft.com/get-possible-users-task-and-execute-...) to get the userIds of the possible hiring managers and then gets their names, stores the userid-name mapping in some transient data, and displays the names as the possible values. You need to be sure that you have the right actor definition and mapping so you get the right list of hiring managers.

Then define an output operation that sets a process variable (selectedHiringManagerUserid) to be the userId corresponding to the name that was chosen. This will be need another script to gets the mapping from your transient data.

In the next step, use the single user actor filter with the value of selectedHiringManagerUserid to direct the task to the hiring manager.

Hope it helps - or sparks some other ideas!

1
0
-1

Hello,

To assign one specific task to a user whose username has been stored in a proces variable you have to:

1: click on the task you want to assign to this user 2: click on "actors" in the general pane 3: click on Set for "actor filter" 4: choose "single user" 5: In the wizard, select your variable as a user id

Comments

Submitted by florian-meurs on Wed, 07/23/2014 - 16:57

That´s awesome - thank you very much! I thought I´d have to program the actor filter myself.

Only thing I did differently was that I didn´t select just the task but the whole lane when specifying the actor-filter. Anyhow, without you, I wouldn´t have found this solution, so thanks again!

Edit: It seemed to work the first times, but now I see that the task is still not assigned to one specific user -all users who are actors in the hiring manager lane have access to the task and can perform it.... I will look into it tomorrow.

Submitted by florian-meurs on Thu, 07/24/2014 - 13:19

I followed your instructions and tried it with both, choosing only the task and choosing the whole lane - unfortunately it doesn´t work. If I set the variable as user ID, the task is assigned to none of the possible managers in charge of the task/lane. Even when I enter the user ID of one specific user in the wizard, the task is not assigned to this user, it just doesn´t appear at all. I tried it with all kinds of different variations of user configurations but maybe I just missed the one right combination...

Maybe a further description of the process helps: As a first task, a HR manager registers a new employee with information concerning the department and also the hiring manager, which of course is not always the same manager for all new employees. So there is a pool of managers to choose from and the manager that is chosen should be the one who gets the task of specifying the workplace and IT.

Thanks again for anything that helps!

Submitted by aCordier on Wed, 07/30/2014 - 23:09

An actor filter of type "single user" is waiting for an internal actorID (which tends to appear in the url when you are visualizing a user) If you want to filter on a string representing a username in your organization put this statement in a script:

apiAccessor.getIdentityAPI().getUserByUserName(managerUsername).getId()

where manager username is the username of the designated manager

simple process here: https://drive.google.com/file/d/0ByVy8us8QORURllCUUdKX3BEUnM/edit?usp=sh...

It should work after mapping the actor from the manager lane to your manager pool and the hr_officer to your hr officer (fair enough)

If this resolved your issue let me know as I update my answer.

Notifications